feat(eslint): sonar js plugin for eslint is added

This commit is contained in:
Palash gupta 2022-03-04 10:07:52 +05:30
parent c9b07ee5dd
commit f3b2f30c82
No known key found for this signature in database
GPG Key ID: 8FD05AE6F9150AD6
3 changed files with 11 additions and 1 deletions

View File

@ -10,6 +10,7 @@ module.exports = {
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:prettier/recommended',
'plugin:sonarjs/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
@ -42,7 +43,10 @@ module.exports = {
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/no-var-requires': 0,
'react/no-array-index-key': 2,
'linebreak-style': ['error', process.platform === 'win32' ? 'windows' : 'unix'],
'linebreak-style': [
'error',
process.platform === 'win32' ? 'windows' : 'unix',
],
// simple sort error
'simple-import-sort/imports': 'error',

View File

@ -133,6 +133,7 @@
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-simple-import-sort": "^7.0.0",
"eslint-plugin-sonarjs": "^0.12.0",
"husky": "4.3.8",
"less-plugin-npm-import": "^2.1.0",
"lint-staged": "10.5.3",

View File

@ -5863,6 +5863,11 @@ eslint-plugin-simple-import-sort@^7.0.0:
resolved "https://registry.yarnpkg.com/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-7.0.0.tgz#a1dad262f46d2184a90095a60c66fef74727f0f8"
integrity sha512-U3vEDB5zhYPNfxT5TYR7u01dboFZp+HNpnGhkDB2g/2E4wZ/g1Q9Ton8UwCLfRV9yAKyYqDh62oHOamvkFxsvw==
eslint-plugin-sonarjs@^0.12.0:
version "0.12.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-sonarjs/-/eslint-plugin-sonarjs-0.12.0.tgz#03a160a58f179fde084135baec08656b59786b8c"
integrity sha512-soxjK67hoYxO8hesKqXWN50GSM+oG2r35N5WnAMehetahO6zoVpv3HZbdziP0jYWNopEe6te/BFUZOYAZI+qhg==
eslint-scope@5.1.1, eslint-scope@^5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c"