-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
14 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,35 @@ | ||
const { createConfig } = require('eslint-config-galex/dist/createConfig') | ||
const { files: jestFiles } = require('eslint-config-galex/dist/overrides/jest') | ||
const { getDependencies } = require('eslint-config-galex/dist/getDependencies') | ||
const { | ||
files: reactFiles, | ||
createJestOverride, | ||
} = require('eslint-config-galex/dist/overrides/jest') | ||
const { | ||
createReactOverride, | ||
} = require('eslint-config-galex/dist/overrides/react') | ||
|
||
const dependencies = getDependencies() | ||
|
||
module.exports = createConfig({ | ||
env: { | ||
es6: true, | ||
browser: true, | ||
}, | ||
env: { es6: true }, | ||
overrides: [ | ||
{ | ||
files: reactFiles, | ||
createReactOverride({ | ||
...dependencies, | ||
rules: { | ||
'import/no-default-export': 'off', // default exports are common in React | ||
'unicorn/prefer-object-from-entries': 'off', | ||
'unicorn/new-for-builtins': 'off', | ||
'unicorn/prefer-set-has': 'off', | ||
'sonarjs/no-duplicate-string': 'off', | ||
}, | ||
}, | ||
{ | ||
files: jestFiles, | ||
}), | ||
createJestOverride({ | ||
...dependencies, | ||
rules: { | ||
'jest/no-focused-tests': 'warn', // warning instead of error | ||
'jest/prefer-strict-equal': 'off', // `toEqual` is shorter and sufficient in most cases | ||
'jest-formatting/padding-around-all': 'off', // allow writing concise two-line tests | ||
'jest/require-top-level-describe': 'off', // filename should already be meaningful, extra nesting is unnecessary | ||
}, | ||
}, | ||
}), | ||
], | ||
}) |