Skip to content

Commit

Permalink
feat: remove deprecated rules (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey committed Jan 7, 2022
1 parent 1135764 commit 4adcf71
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 21 deletions.
2 changes: 0 additions & 2 deletions import.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ module.exports = {
'import/ignore': ['node_modules', '.json$', '.(scss|less|css|styl)$'],
},
rules: {
'global-require': 'off', // disable because no need to have both!

'import/default': 'error',
'import/dynamic-import-chunkname': 'off',
'import/export': 'error',
Expand Down
10 changes: 8 additions & 2 deletions jest.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
const readPkgUp = require('read-pkg-up')

const {disableRules, mapDeprecatedRules} = require('./utils')
const disableRules = deprecatedRules =>
deprecatedRules.reduce(
(allRules, rule) => ({
...allRules,
[rule]: 'off',
}),
{},
)

let hasJestDom = false
let hasTestingLibrary = false
Expand All @@ -27,7 +34,6 @@ try {
const rules = {
'react/display-name': 'off', // we don't need a display name in test files

...mapDeprecatedRules(['jest/no-expect-resolves']),
'jest/consistent-test-it': 'off',
'jest/expect-expect': 'off',
'jest/lowercase-name': 'off',
Expand Down
5 changes: 0 additions & 5 deletions jsx-a11y.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
const {mapDeprecatedRules} = require('./utils')

module.exports = {
env: {
browser: true,
Expand All @@ -11,9 +9,6 @@ module.exports = {
},
plugins: ['jsx-a11y'],
rules: {
...mapDeprecatedRules([
'jsx-a11y/label-has-for', // see label-has-associated-control
]),
'jsx-a11y/accessible-emoji': 'error',
'jsx-a11y/alt-text': 'warn',
'jsx-a11y/anchor-has-content': 'error',
Expand Down
12 changes: 0 additions & 12 deletions utils.js

This file was deleted.

0 comments on commit 4adcf71

Please sign in to comment.