eslint-config-seek 11.0.1 → 11.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -1
- package/base.js +1 -5
- package/extensions.js +2 -0
- package/index.js +5 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -19,12 +19,20 @@ First, install this package, ESLint and the necessary plugins listed in this pro
|
|
|
19
19
|
|
|
20
20
|
Then create a file named `.eslintrc` with following contents in the root folder of your project:
|
|
21
21
|
|
|
22
|
-
```
|
|
22
|
+
```json
|
|
23
23
|
{
|
|
24
24
|
"extends": "seek"
|
|
25
25
|
}
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
+
The default configuration includes support for React projects. For projects that are not based on React, the "base" configuration should be used instead:
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"extends": "seek/base"
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
28
36
|
You can override the settings from `eslint-config-seek` by editing the `.eslintrc` file. Learn more about [configuring ESLint](http://eslint.org/docs/user-guide/configuring) on the ESLint website.
|
|
29
37
|
|
|
30
38
|
## License
|
package/base.js
CHANGED
|
@@ -76,8 +76,7 @@ const baseRules = {
|
|
|
76
76
|
'no-return-await': OFF,
|
|
77
77
|
};
|
|
78
78
|
|
|
79
|
-
const
|
|
80
|
-
const tsExtensions = ['ts', 'cts', 'mts', 'tsx'];
|
|
79
|
+
const { js: jsExtensions, ts: tsExtensions } = require('./extensions');
|
|
81
80
|
const allExtensions = [...jsExtensions, ...tsExtensions];
|
|
82
81
|
|
|
83
82
|
/** @type {import('eslint').Linter.Config} */
|
|
@@ -86,9 +85,6 @@ const baseConfig = {
|
|
|
86
85
|
parserOptions: {
|
|
87
86
|
requireConfigFile: false,
|
|
88
87
|
sourceType: 'module',
|
|
89
|
-
babelOptions: {
|
|
90
|
-
presets: ['@babel/preset-react'],
|
|
91
|
-
},
|
|
92
88
|
},
|
|
93
89
|
root: true,
|
|
94
90
|
env: {
|
package/extensions.js
ADDED
package/index.js
CHANGED
|
@@ -24,6 +24,11 @@ const eslintConfig = {
|
|
|
24
24
|
},
|
|
25
25
|
plugins: ['react', 'react-hooks'],
|
|
26
26
|
extends: ['plugin:react/recommended', './base.js'],
|
|
27
|
+
parserOptions: {
|
|
28
|
+
babelOptions: {
|
|
29
|
+
presets: [require.resolve('@babel/preset-react')],
|
|
30
|
+
},
|
|
31
|
+
},
|
|
27
32
|
rules: {
|
|
28
33
|
...reactRules,
|
|
29
34
|
},
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-seek",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.1.1",
|
|
4
4
|
"description": "ESLint configuration used by SEEK",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
7
7
|
"index.js",
|
|
8
|
-
"base.js"
|
|
8
|
+
"base.js",
|
|
9
|
+
"extensions.js"
|
|
9
10
|
],
|
|
10
11
|
"repository": {
|
|
11
12
|
"type": "git",
|