@wildpastry/eslint-config 1.6.5 → 1.7.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/index.js +40 -49
- package/package.json +3 -2
package/index.js
CHANGED
|
@@ -1,50 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
spread: true,
|
|
38
|
-
superInFunctions: true,
|
|
39
|
-
templateStrings: true,
|
|
40
|
-
unicodeCodePointEscapes: true,
|
|
41
|
-
globalReturn: true,
|
|
42
|
-
jsx: true
|
|
1
|
+
import pluginReact from 'eslint-plugin-react';
|
|
2
|
+
import pluginPrettier from 'eslint-plugin-prettier';
|
|
3
|
+
import pluginTS from '@typescript-eslint/eslint-plugin';
|
|
4
|
+
import parserTS from '@typescript-eslint/parser';
|
|
5
|
+
import globals from 'globals';
|
|
6
|
+
|
|
7
|
+
export default [
|
|
8
|
+
{
|
|
9
|
+
files: ['**/*.{ts,tsx,js,jsx}'],
|
|
10
|
+
languageOptions: {
|
|
11
|
+
parser: parserTS,
|
|
12
|
+
ecmaVersion: 2020,
|
|
13
|
+
sourceType: 'module',
|
|
14
|
+
globals: {
|
|
15
|
+
...globals.browser,
|
|
16
|
+
...globals.node,
|
|
17
|
+
},
|
|
18
|
+
parserOptions: {
|
|
19
|
+
ecmaFeatures: {
|
|
20
|
+
jsx: true,
|
|
21
|
+
},
|
|
22
|
+
sourceType: 'module',
|
|
23
|
+
requireConfigFile: false,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
settings: {
|
|
27
|
+
react: {
|
|
28
|
+
createClass: 'createReactClass',
|
|
29
|
+
pragma: 'React',
|
|
30
|
+
version: 'detect',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
plugins: {
|
|
34
|
+
'@typescript-eslint': pluginTS,
|
|
35
|
+
react: pluginReact,
|
|
36
|
+
prettier: pluginPrettier,
|
|
43
37
|
},
|
|
44
|
-
|
|
45
|
-
sourceType: "module"
|
|
46
|
-
},
|
|
47
|
-
rules: {
|
|
38
|
+
rules: {
|
|
48
39
|
// Code
|
|
49
40
|
"no-inferrable-types": 0, // disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean // DONE - OFF
|
|
50
41
|
"no-unsafe-assignment": 0, // disallow assigning a value with type any to variables and properties // DONE - OFF
|
|
@@ -300,7 +291,6 @@ module.exports = {
|
|
|
300
291
|
"no-sparse-arrays": 1, // disallow sparse arrays // DONE
|
|
301
292
|
"no-unreachable": 1, // disallow unreachable statements after a return, throw, continue, or break statement // DONE
|
|
302
293
|
"use-isnan": 1, // disallow comparisons with the value NaN // DONE
|
|
303
|
-
"valid-jsdoc": 1, // ensure JSDoc comments are valid // DONE
|
|
304
294
|
"valid-typeof": 1, // ensure that the results of typeof are compared against a valid string // DONE
|
|
305
295
|
"no-catch-shadow": 1, // disallow the catch clause parameter name being the same as a variable in the outer scope // DONE
|
|
306
296
|
"no-unused-vars": 1, // disallow declaration of variables that are not used in the code // DONE
|
|
@@ -358,5 +348,6 @@ module.exports = {
|
|
|
358
348
|
|
|
359
349
|
// Prettier specific
|
|
360
350
|
"prettier/prettier": 1
|
|
361
|
-
}
|
|
362
|
-
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildpastry/eslint-config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"description": "ESLint configuration file",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -19,5 +19,6 @@
|
|
|
19
19
|
"license": "UNLICENSED",
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"eslint": ">= 3"
|
|
22
|
-
}
|
|
22
|
+
},
|
|
23
|
+
"type": "module"
|
|
23
24
|
}
|