refactor: make eslint consistent with other services

Make eslint consistent with other services

commit-id:5e520892
This commit is contained in:
Conicaw 2023-12-29 20:10:33 -06:00
parent 2c7a715dd8
commit c9dd5e8d02
No known key found for this signature in database
GPG key ID: 8DE10AC00159C418
3 changed files with 51 additions and 0 deletions

View file

@ -9,7 +9,9 @@ module.exports = {
'@typescript-eslint/eslint-plugin',
'simple-import-sort',
'no-type-assertion',
'sonarjs',
'import',
'unused-imports',
],
extends: [
'eslint:recommended',
@ -18,6 +20,7 @@ module.exports = {
'plugin:@typescript-eslint/stylistic-type-checked',
'plugin:@typescript-eslint/strict',
'plugin:prettier/recommended',
'plugin:sonarjs/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
],
@ -26,6 +29,7 @@ module.exports = {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
rules: {
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
@ -72,5 +76,6 @@ module.exports = {
],
'prefer-template': 'error',
'@typescript-eslint/return-await': ['error', 'always'],
'unused-imports/no-unused-imports': 'error',
},
};

44
package-lock.json generated
View file

@ -25,6 +25,8 @@
"eslint-plugin-no-type-assertion": "^1.3.0",
"eslint-plugin-prettier": "^5.1.2",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-sonarjs": "^0.23.0",
"eslint-plugin-unused-imports": "^3.0.0",
"husky": "^8.0.3",
"lint-staged": "^15.2.0",
"prettier": "^3.1.1",
@ -1835,6 +1837,48 @@
"eslint": ">=5.0.0"
}
},
"node_modules/eslint-plugin-sonarjs": {
"version": "0.23.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-sonarjs/-/eslint-plugin-sonarjs-0.23.0.tgz",
"integrity": "sha512-z44T3PBf9W7qQ/aR+NmofOTyg6HLhSEZOPD4zhStqBpLoMp8GYhFksuUBnCxbnf1nfISpKBVkQhiBLFI/F4Wlg==",
"dev": true,
"engines": {
"node": ">=14"
},
"peerDependencies": {
"eslint": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
}
},
"node_modules/eslint-plugin-unused-imports": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-3.0.0.tgz",
"integrity": "sha512-sduiswLJfZHeeBJ+MQaG+xYzSWdRXoSw61DpU13mzWumCkR0ufD0HmO4kdNokjrkluMHpj/7PJeN35pgbhW3kw==",
"dev": true,
"dependencies": {
"eslint-rule-composer": "^0.3.0"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
},
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "^6.0.0",
"eslint": "^8.0.0"
},
"peerDependenciesMeta": {
"@typescript-eslint/eslint-plugin": {
"optional": true
}
}
},
"node_modules/eslint-rule-composer": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz",
"integrity": "sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==",
"dev": true,
"engines": {
"node": ">=4.0.0"
}
},
"node_modules/eslint-scope": {
"version": "7.2.2",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz",

View file

@ -43,6 +43,8 @@
"eslint-plugin-no-type-assertion": "^1.3.0",
"eslint-plugin-prettier": "^5.1.2",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-sonarjs": "^0.23.0",
"eslint-plugin-unused-imports": "^3.0.0",
"husky": "^8.0.3",
"lint-staged": "^15.2.0",
"prettier": "^3.1.1",