Skip to content

Commit

Permalink
build: atualiza eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
klawdyo committed Sep 11, 2024
1 parent 6165d77 commit e38eb00
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 244 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

76 changes: 38 additions & 38 deletions .eslintrc.js → eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
module.exports = {
root: true,
extends: ['airbnb-base', 'prettier'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
env: {
node: true,
jest: true,
},
// root: true,
// extends: ['airbnb-base', 'prettier'],
// parserOptions: {
// ecmaVersion: 2018,
// sourceType: 'module',
// },
// env: {
// node: true,
// jest: true,
// },
settings: {
'import/resolver': {
node: {
Expand All @@ -18,19 +17,19 @@ module.exports = {
},
},
rules: {
'@typescript-eslint/no-unused-vars': ['error', { varsIgnorePattern: '^_', args: 'none' }],
// '@typescript-eslint/no-unused-vars': ['error', { varsIgnorePattern: '^_', args: 'none' }],
'array-callback-return': 'off',
'arrow-body-style': 'off',
curly: ['error', 'multi-line', 'consistent'],
'class-methods-use-this': 'off',
'consistent-return': 'warn',
'default-case': 'off',
'import/extensions': ['error', 'never'],
'import/first': 'warn',
'import/no-named-as-default': 'warn',
'import/no-named-as-default-member': 'warn',
'import/no-unresolved': 'warn',
'import/prefer-default-export': 'off',
// 'import/extensions': ['error', 'never'],
// 'import/first': 'warn',
// 'import/no-named-as-default': 'warn',
// 'import/no-named-as-default-member': 'warn',
// 'import/no-unresolved': 'warn',
// 'import/prefer-default-export': 'off',
'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }],
'max-classes-per-file': 'off',
'max-len': ['error', 120, 2, { ignoreUrls: true, ignoreTemplateLiterals: true }],
Expand All @@ -43,7 +42,7 @@ module.exports = {
'no-loop-func': 'off',
'no-mixed-operators': 'off',
'no-nested-ternary': 'off',
'no-only-tests/no-only-tests': 'error',
// 'no-only-tests/no-only-tests': 'error',
'no-param-reassign': 'off',
'no-plusplus': 'off',
'no-prototype-builtins': 'off',
Expand All @@ -60,23 +59,24 @@ module.exports = {
'sort-imports': 'off',
'no-unused-expressions': 'off',
quotes: ['error', 'single', { avoidEscape: true }],
'@typescript-eslint/ban-types': 'error',
// '@typescript-eslint/ban-types': 'error',
},
overrides: [
{
files: ['*.ts'],
rules: {
'no-dupe-class-members': 'off',
'no-undef': 'off',
'@typescript-eslint/explicit-function-return-type': 'error',
},
},
{
files: ['*.d.ts'],
rules: {
'no-useless-constructor': 'off', // crashes on constructor declaration in .d.ts files
},
},
],
plugins: ['no-only-tests', '@typescript-eslint'],
}
// overrides: [
// {
// files: ['*.ts'],
// rules: {
// 'no-dupe-class-members': 'off',
// 'no-undef': 'off',
// '@typescript-eslint/explicit-function-return-type': 'error',
// },
// },
// {
// files: ['*.d.ts'],
// rules: {
// 'no-useless-constructor': 'off', // crashes on constructor declaration in .d.ts files
// },
// },
// ],
// plugins: ['no-only-tests', '@typescript-eslint'],
ignores: ['dist/*', '/node_modules/**'],
};
201 changes: 0 additions & 201 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"test": "jest",
"test:watch": "jest --watch",
"test:coverage": "jest --collectCoverageFrom=src/**/*.ts --coverage",
"lint:list": "eslint */**/*.js --fix",
"lint:list": "eslint */**/*.js --fix --no-warn-ignored",
"format": "prettier --write \"./**/*.{js,ts,json}\""
},
"lint-staged": {
Expand All @@ -23,7 +23,6 @@
"devDependencies": {
"@types/jest": "^27.4.0",
"@types/node": "^14.14.2",
"@typescript-eslint/parser": "^8.5.0",
"eslint": "^9.10.0",
"jest": "^29.7.0",
"prettier": "^2.1.2",
Expand Down Expand Up @@ -107,4 +106,4 @@
"adonis4",
"adonisjs4"
]
}
}

0 comments on commit e38eb00

Please sign in to comment.