Skip to content

Commit

Permalink
feat(eslint): code refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Natalie-Smirnova committed Dec 12, 2022
1 parent 83d5dec commit 468b94a
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ plugins:
- 'editorconfig'
- '@typescript-eslint'
- 'eslint-plugin-tsdoc'
- 'custom-rules'
- 'esl'

# Overall rules
rules:
Expand All @@ -46,4 +46,4 @@ rules:
'editorconfig/no-trailing-spaces': warn

# Require to replace deprecated aliases
'custom-rules/deprecated/traversing-query': warn
'esl/deprecated/traversing-query': warn
1 change: 1 addition & 0 deletions eslint/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
exports.rules = {
//TODO: other actual deprecations
'deprecated/traversing-query': require('./rules/deprecated/traversing-query')
};
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = {
'^.+\\.tsx?$': ['ts-jest']
},
testEnvironment: 'jsdom',
roots: ['eslint'],
roots: ['src/modules', 'src/polyfills', 'eslint'],
testRegex: '/test/(.+)\\.test\\.(ts|js)$',
moduleFileExtensions: ['ts', 'js', 'json'],
coverageDirectory: '.report',
Expand Down
16 changes: 8 additions & 8 deletions package-lock.json

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

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@
"concurrently": "^7.6.0",
"copyfiles": "^2.4.1",
"eslint": "^8.29.0",
"eslint-plugin-custom-rules": "file:eslint",
"eslint-plugin-editorconfig": "^4.0.2",
"eslint-plugin-esl": "file:eslint",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-sonarjs": "^0.17.0",
"eslint-plugin-tsdoc": "^0.2.17",
Expand Down Expand Up @@ -193,9 +193,9 @@
],
"eslint": [
{
"name": "eslint-plugin-custom-rules",
"version": "1.0.0",
"main": "index.js"
"name": "eslint-plugin-esl",
"version": "4.1.0",
"main": "eslint/index.js"
}
]
}

0 comments on commit 468b94a

Please # to comment.