@newsteam/eslint-config 0.0.92 → 0.0.93
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/lib/cjs/index.d.ts +3 -0
- package/lib/cjs/index.js +45 -0
- package/lib/cjs/overrides/index.d.ts +2 -0
- package/lib/cjs/overrides/index.js +9 -0
- package/lib/cjs/overrides/javascript.d.ts +2 -0
- package/lib/cjs/overrides/javascript.js +11 -0
- package/lib/cjs/overrides/typescript.d.ts +2 -0
- package/lib/cjs/overrides/typescript.js +39 -0
- package/lib/cjs/plugins/array-function.d.ts +12 -0
- package/lib/cjs/plugins/array-function.js +54 -0
- package/lib/cjs/plugins/async-await.d.ts +8 -0
- package/lib/cjs/plugins/async-await.js +23 -0
- package/lib/cjs/plugins/css-modules.d.ts +17 -0
- package/lib/cjs/plugins/css-modules.js +41 -0
- package/lib/cjs/plugins/es/es2015.d.ts +70 -0
- package/lib/cjs/plugins/es/es2015.js +400 -0
- package/lib/cjs/plugins/es/es2016.d.ts +6 -0
- package/lib/cjs/plugins/es/es2016.js +16 -0
- package/lib/cjs/plugins/es/es2017.d.ts +12 -0
- package/lib/cjs/plugins/es/es2017.js +52 -0
- package/lib/cjs/plugins/es/es2018.d.ts +12 -0
- package/lib/cjs/plugins/es/es2018.js +52 -0
- package/lib/cjs/plugins/es/es2019.d.ts +9 -0
- package/lib/cjs/plugins/es/es2019.js +34 -0
- package/lib/cjs/plugins/es/es2020.d.ts +13 -0
- package/lib/cjs/plugins/es/es2020.js +58 -0
- package/lib/cjs/plugins/es/es2021.d.ts +9 -0
- package/lib/cjs/plugins/es/es2021.js +34 -0
- package/lib/cjs/plugins/es/es5.d.ts +23 -0
- package/lib/cjs/plugins/es/es5.js +118 -0
- package/lib/cjs/plugins/es/index.d.ts +5 -0
- package/lib/cjs/plugins/es/index.js +19 -0
- package/lib/cjs/plugins/eslint-comments/best-practices.d.ts +14 -0
- package/lib/cjs/plugins/eslint-comments/best-practices.js +60 -0
- package/lib/cjs/plugins/eslint-comments/index.d.ts +5 -0
- package/lib/cjs/plugins/eslint-comments/index.js +14 -0
- package/lib/cjs/plugins/eslint-comments/style.d.ts +7 -0
- package/lib/cjs/plugins/eslint-comments/style.js +25 -0
- package/lib/cjs/plugins/filenames.d.ts +9 -0
- package/lib/cjs/plugins/filenames.js +48 -0
- package/lib/cjs/plugins/format-message.d.ts +29 -0
- package/lib/cjs/plugins/format-message.js +151 -0
- package/lib/cjs/plugins/import/index.d.ts +19 -0
- package/lib/cjs/plugins/import/index.js +43 -0
- package/lib/cjs/plugins/import/module-systems.d.ts +10 -0
- package/lib/cjs/plugins/import/module-systems.js +43 -0
- package/lib/cjs/plugins/import/static-analysis.d.ts +20 -0
- package/lib/cjs/plugins/import/static-analysis.js +113 -0
- package/lib/cjs/plugins/import/style.d.ts +45 -0
- package/lib/cjs/plugins/import/style.js +190 -0
- package/lib/cjs/plugins/import/warnings.d.ts +11 -0
- package/lib/cjs/plugins/import/warnings.js +49 -0
- package/lib/cjs/plugins/more.d.ts +18 -0
- package/lib/cjs/plugins/more.js +94 -0
- package/lib/cjs/plugins/no-unsanitized.d.ts +8 -0
- package/lib/cjs/plugins/no-unsanitized.js +35 -0
- package/lib/cjs/plugins/no-useless-assign.d.ts +7 -0
- package/lib/cjs/plugins/no-useless-assign.js +17 -0
- package/lib/cjs/plugins/node/best-practices.d.ts +6 -0
- package/lib/cjs/plugins/node/best-practices.js +16 -0
- package/lib/cjs/plugins/node/errors.d.ts +31 -0
- package/lib/cjs/plugins/node/errors.js +148 -0
- package/lib/cjs/plugins/node/index.d.ts +24 -0
- package/lib/cjs/plugins/node/index.js +35 -0
- package/lib/cjs/plugins/node/style.d.ts +35 -0
- package/lib/cjs/plugins/node/style.js +161 -0
- package/lib/cjs/plugins/optimize-regex.d.ts +7 -0
- package/lib/cjs/plugins/optimize-regex.js +20 -0
- package/lib/cjs/plugins/prefer-object-spread.d.ts +7 -0
- package/lib/cjs/plugins/prefer-object-spread.js +22 -0
- package/lib/cjs/plugins/promise.d.ts +20 -0
- package/lib/cjs/plugins/promise.js +103 -0
- package/lib/cjs/plugins/react/base.d.ts +71 -0
- package/lib/cjs/plugins/react/base.js +393 -0
- package/lib/cjs/plugins/react/index.d.ts +15 -0
- package/lib/cjs/plugins/react/index.js +23 -0
- package/lib/cjs/plugins/react/jsx.d.ts +50 -0
- package/lib/cjs/plugins/react/jsx.js +274 -0
- package/lib/cjs/plugins/react-hooks.d.ts +8 -0
- package/lib/cjs/plugins/react-hooks.js +27 -0
- package/lib/cjs/plugins/react-native.d.ts +13 -0
- package/lib/cjs/plugins/react-native.js +57 -0
- package/lib/cjs/plugins/react-perf.d.ts +10 -0
- package/lib/cjs/plugins/react-perf.js +42 -0
- package/lib/cjs/plugins/security.d.ts +19 -0
- package/lib/cjs/plugins/security.js +106 -0
- package/lib/cjs/plugins/sort-keys-fix.d.ts +9 -0
- package/lib/cjs/plugins/sort-keys-fix.js +24 -0
- package/lib/cjs/plugins/typescript.d.ts +240 -0
- package/lib/cjs/plugins/typescript.js +1032 -0
- package/lib/cjs/plugins/unicorn.d.ts +140 -0
- package/lib/cjs/plugins/unicorn.js +697 -0
- package/lib/cjs/plugins/webassembly.d.ts +7 -0
- package/lib/cjs/plugins/webassembly.js +17 -0
- package/lib/cjs/rules.d.ts +412 -0
- package/lib/cjs/rules.js +2002 -0
- package/lib/cjs/settings.d.ts +11 -0
- package/lib/cjs/settings.js +24 -0
- package/lib/cjs/test/test-duplicate-import-from.d.ts +4 -0
- package/lib/cjs/test/test-duplicate-import-from.js +7 -0
- package/lib/cjs/test/test-duplicate-import.d.ts +1 -0
- package/lib/cjs/test/test-duplicate-import.js +6 -0
- package/lib/cjs/test/test-eslint-plugin-more.d.ts +2 -0
- package/lib/cjs/test/test-eslint-plugin-more.js +8 -0
- package/lib/cjs/test/test-typescript-issues.d.ts +2 -0
- package/lib/cjs/test/test-typescript-issues.js +7 -0
- package/lib/cjs/test/unpublished-import-json.json +3 -0
- package/lib/cjs/test/unpublished-import.d.ts +1 -0
- package/lib/cjs/test/unpublished-import.js +7 -0
- package/package.json +3 -5
- package/lib/definitions.d.ts +0 -0
- package/lib/index.js +0 -29
- package/lib/index.mjs +0 -19
- package/lib/index.test.mjs +0 -9
- package/lib/overrides/index.js +0 -13
- package/lib/overrides/index.mjs +0 -3
- package/lib/overrides/javascript.js +0 -18
- package/lib/overrides/javascript.mjs +0 -5
- package/lib/overrides/typescript.js +0 -42
- package/lib/overrides/typescript.mjs +0 -35
- package/lib/plugins/array-function.js +0 -19
- package/lib/plugins/array-function.mjs +0 -11
- package/lib/plugins/async-await.js +0 -15
- package/lib/plugins/async-await.mjs +0 -7
- package/lib/plugins/css-modules.js +0 -24
- package/lib/plugins/css-modules.mjs +0 -16
- package/lib/plugins/es/es2015.js +0 -77
- package/lib/plugins/es/es2015.mjs +0 -69
- package/lib/plugins/es/es2016.js +0 -13
- package/lib/plugins/es/es2016.mjs +0 -5
- package/lib/plugins/es/es2017.js +0 -19
- package/lib/plugins/es/es2017.mjs +0 -11
- package/lib/plugins/es/es2018.js +0 -19
- package/lib/plugins/es/es2018.mjs +0 -11
- package/lib/plugins/es/es2019.js +0 -16
- package/lib/plugins/es/es2019.mjs +0 -8
- package/lib/plugins/es/es2020.js +0 -20
- package/lib/plugins/es/es2020.mjs +0 -12
- package/lib/plugins/es/es2021.js +0 -16
- package/lib/plugins/es/es2021.mjs +0 -8
- package/lib/plugins/es/es5.js +0 -30
- package/lib/plugins/es/es5.mjs +0 -22
- package/lib/plugins/es/index.js +0 -12
- package/lib/plugins/es/index.mjs +0 -4
- package/lib/plugins/eslint-comments/best-practices.js +0 -21
- package/lib/plugins/eslint-comments/best-practices.mjs +0 -13
- package/lib/plugins/eslint-comments/index.js +0 -12
- package/lib/plugins/eslint-comments/index.mjs +0 -4
- package/lib/plugins/eslint-comments/style.js +0 -14
- package/lib/plugins/eslint-comments/style.mjs +0 -6
- package/lib/plugins/filenames.js +0 -16
- package/lib/plugins/filenames.mjs +0 -8
- package/lib/plugins/format-message.js +0 -43
- package/lib/plugins/format-message.mjs +0 -33
- package/lib/plugins/import/index.js +0 -26
- package/lib/plugins/import/index.mjs +0 -18
- package/lib/plugins/import/module-systems.js +0 -17
- package/lib/plugins/import/module-systems.mjs +0 -9
- package/lib/plugins/import/static-analysis.js +0 -27
- package/lib/plugins/import/static-analysis.mjs +0 -19
- package/lib/plugins/import/style.js +0 -52
- package/lib/plugins/import/style.mjs +0 -44
- package/lib/plugins/import/warnings.js +0 -18
- package/lib/plugins/import/warnings.mjs +0 -10
- package/lib/plugins/more.js +0 -25
- package/lib/plugins/more.mjs +0 -17
- package/lib/plugins/no-unsanitized.js +0 -15
- package/lib/plugins/no-unsanitized.mjs +0 -7
- package/lib/plugins/no-useless-assign.js +0 -14
- package/lib/plugins/no-useless-assign.mjs +0 -6
- package/lib/plugins/node/best-practices.js +0 -13
- package/lib/plugins/node/best-practices.mjs +0 -5
- package/lib/plugins/node/errors.js +0 -40
- package/lib/plugins/node/errors.mjs +0 -32
- package/lib/plugins/node/index.js +0 -31
- package/lib/plugins/node/index.mjs +0 -23
- package/lib/plugins/node/style.js +0 -42
- package/lib/plugins/node/style.mjs +0 -34
- package/lib/plugins/optimize-regex.js +0 -14
- package/lib/plugins/optimize-regex.mjs +0 -6
- package/lib/plugins/prefer-object-spread.js +0 -14
- package/lib/plugins/prefer-object-spread.mjs +0 -6
- package/lib/plugins/promise.js +0 -27
- package/lib/plugins/promise.mjs +0 -19
- package/lib/plugins/react/base.js +0 -78
- package/lib/plugins/react/base.mjs +0 -70
- package/lib/plugins/react/index.js +0 -22
- package/lib/plugins/react/index.mjs +0 -14
- package/lib/plugins/react/jsx.js +0 -57
- package/lib/plugins/react/mjsx.js +0 -49
- package/lib/plugins/react-hooks.js +0 -15
- package/lib/plugins/react-hooks.mjs +0 -7
- package/lib/plugins/react-native.js +0 -20
- package/lib/plugins/react-native.mjs +0 -12
- package/lib/plugins/react-perf.js +0 -17
- package/lib/plugins/react-perf.mjs +0 -9
- package/lib/plugins/security.js +0 -26
- package/lib/plugins/security.mjs +0 -18
- package/lib/plugins/sort-keys-fix.js +0 -16
- package/lib/plugins/sort-keys-fix.mjs +0 -8
- package/lib/plugins/typescript.js +0 -262
- package/lib/plugins/typescript.mjs +0 -252
- package/lib/plugins/unicorn.js +0 -147
- package/lib/plugins/unicorn.mjs +0 -139
- package/lib/plugins/webassembly.js +0 -14
- package/lib/plugins/webassembly.mjs +0 -6
- package/lib/rules.js +0 -451
- package/lib/rules.mjs +0 -438
- package/lib/settings.js +0 -21
- package/lib/settings.mjs +0 -11
- package/lib/types/confusing-browser-globals.d.ts +0 -9
package/lib/cjs/index.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var overrides_1 = require("./overrides");
|
|
3
|
+
module.exports = {
|
|
4
|
+
env: {
|
|
5
|
+
browser: true,
|
|
6
|
+
jasmine: true,
|
|
7
|
+
node: true
|
|
8
|
+
},
|
|
9
|
+
extends: [
|
|
10
|
+
"./plugins/array-function",
|
|
11
|
+
"./plugins/async-await",
|
|
12
|
+
"./plugins/css-modules",
|
|
13
|
+
"./plugins/es",
|
|
14
|
+
"./plugins/eslint-comments",
|
|
15
|
+
"./plugins/filenames",
|
|
16
|
+
"./plugins/format-message",
|
|
17
|
+
"./plugins/import",
|
|
18
|
+
"./plugins/more",
|
|
19
|
+
"./plugins/no-unsanitized",
|
|
20
|
+
"./plugins/no-useless-assign",
|
|
21
|
+
"./plugins/node",
|
|
22
|
+
"./plugins/optimize-regex",
|
|
23
|
+
"./plugins/prefer-object-spread",
|
|
24
|
+
"./plugins/promise",
|
|
25
|
+
"./plugins/react",
|
|
26
|
+
"./plugins/react-hooks",
|
|
27
|
+
"./plugins/react-native",
|
|
28
|
+
"./plugins/react-perf",
|
|
29
|
+
"./plugins/security",
|
|
30
|
+
"./plugins/sort-keys-fix",
|
|
31
|
+
"./plugins/typescript",
|
|
32
|
+
"./plugins/unicorn",
|
|
33
|
+
"./plugins/webassembly",
|
|
34
|
+
"./rules"
|
|
35
|
+
].map(function (string) { return require.resolve(string); }),
|
|
36
|
+
overrides: overrides_1.overrides,
|
|
37
|
+
parser: "@typescript-eslint/parser",
|
|
38
|
+
parserOptions: {
|
|
39
|
+
ecmaVersion: 2020,
|
|
40
|
+
project: "./tsconfig.json",
|
|
41
|
+
sourceType: "module",
|
|
42
|
+
tsconfigRootDir: "./"
|
|
43
|
+
},
|
|
44
|
+
plugins: ["@typescript-eslint"]
|
|
45
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.overrides = void 0;
|
|
4
|
+
var javascript_1 = require("./javascript");
|
|
5
|
+
var typescript_1 = require("./typescript");
|
|
6
|
+
exports.overrides = [
|
|
7
|
+
javascript_1.javascriptOverrides,
|
|
8
|
+
typescript_1.typescriptOverrides
|
|
9
|
+
];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.javascriptOverrides = void 0;
|
|
7
|
+
var typescript_1 = __importDefault(require("../plugins/typescript"));
|
|
8
|
+
exports.javascriptOverrides = {
|
|
9
|
+
files: ["*.js", "*.jsx"],
|
|
10
|
+
rules: Object.fromEntries(Object.keys(typescript_1.default.rules).map(function (rule) { return [rule, "off"]; }))
|
|
11
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.typescriptOverrides = void 0;
|
|
4
|
+
exports.typescriptOverrides = {
|
|
5
|
+
files: ["*.ts", "*.tsx"],
|
|
6
|
+
// Overridden by @typescript-eslint
|
|
7
|
+
rules: {
|
|
8
|
+
"brace-style": "off",
|
|
9
|
+
camelcase: "off",
|
|
10
|
+
"comma-dangle": "off",
|
|
11
|
+
"default-param-last": "off",
|
|
12
|
+
"dot-notation": "off",
|
|
13
|
+
indent: "off",
|
|
14
|
+
"init-declarations": "off",
|
|
15
|
+
"keyword-spacing": "off",
|
|
16
|
+
"lines-between-class-members": "off",
|
|
17
|
+
"no-duplicate-imports": "off",
|
|
18
|
+
"no-empty-function": "off",
|
|
19
|
+
"no-extra-parens": "off",
|
|
20
|
+
"no-extra-semi": "off",
|
|
21
|
+
"no-invalid-this": "off",
|
|
22
|
+
"no-loop-func": "off",
|
|
23
|
+
"no-loss-of-precision": "off",
|
|
24
|
+
"no-magic-numbers": "off",
|
|
25
|
+
"no-redeclare": "off",
|
|
26
|
+
"no-shadow": "off",
|
|
27
|
+
"no-undef-init": "off",
|
|
28
|
+
"no-undefined": "off",
|
|
29
|
+
"no-unused-vars": "off",
|
|
30
|
+
"no-use-before-define": "off",
|
|
31
|
+
"padding-line-between-statements": "off",
|
|
32
|
+
quotes: "off",
|
|
33
|
+
"require-await": "off",
|
|
34
|
+
semi: "off",
|
|
35
|
+
"space-before-blocks": "off",
|
|
36
|
+
"space-before-function-paren": "off",
|
|
37
|
+
"space-infix-ops": "off"
|
|
38
|
+
}
|
|
39
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
plugins: string[];
|
|
3
|
+
rules: {
|
|
4
|
+
"array-func/avoid-reverse": string;
|
|
5
|
+
"array-func/from-map": string;
|
|
6
|
+
"array-func/no-unnecessary-this-arg": string;
|
|
7
|
+
"array-func/prefer-array-from": string;
|
|
8
|
+
"array-func/prefer-flat": string;
|
|
9
|
+
"array-func/prefer-flat-map": string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export = _default;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Rules for Array functions and methods.
|
|
4
|
+
*
|
|
5
|
+
* https://www.npmjs.com/package/eslint-plugin-array-func
|
|
6
|
+
*/
|
|
7
|
+
module.exports = {
|
|
8
|
+
plugins: ["array-func"],
|
|
9
|
+
rules: {
|
|
10
|
+
/*
|
|
11
|
+
* Avoid reversing the array and running a method on it if there is an
|
|
12
|
+
* equivalent of the method operating on the array from the other end.
|
|
13
|
+
*
|
|
14
|
+
* https://www.npmjs.com/package/eslint-plugin-array-func#avoid-reverse
|
|
15
|
+
*/
|
|
16
|
+
"array-func/avoid-reverse": "error",
|
|
17
|
+
/*
|
|
18
|
+
* Prefer using the mapFn callback of Array.from over an immediate
|
|
19
|
+
* .map() call on the Array.from result.
|
|
20
|
+
*
|
|
21
|
+
* https://www.npmjs.com/package/eslint-plugin-array-func#from-map
|
|
22
|
+
*/
|
|
23
|
+
"array-func/from-map": "error",
|
|
24
|
+
/*
|
|
25
|
+
* Avoid the this parameter when providing arrow function as callback
|
|
26
|
+
* in array functions.
|
|
27
|
+
*
|
|
28
|
+
* https://www.npmjs.com/package/eslint-plugin-array-func#no-unnecessary-this-arg
|
|
29
|
+
*/
|
|
30
|
+
"array-func/no-unnecessary-this-arg": "error",
|
|
31
|
+
/*
|
|
32
|
+
* Use Array.from instead of [...iterable] for performance benefits.
|
|
33
|
+
*
|
|
34
|
+
* Off for now, performance benefits probably don't warrant the irritation
|
|
35
|
+
*
|
|
36
|
+
* https://www.npmjs.com/package/eslint-plugin-array-func#prefer-array-from
|
|
37
|
+
*/
|
|
38
|
+
"array-func/prefer-array-from": "off",
|
|
39
|
+
/*
|
|
40
|
+
* Use .flat() to flatten an array of arrays. This rule currently
|
|
41
|
+
* recognizes two patterns and can replace them with a .flat() call.
|
|
42
|
+
*
|
|
43
|
+
* https://www.npmjs.com/package/eslint-plugin-array-func#prefer-flat
|
|
44
|
+
*/
|
|
45
|
+
"array-func/prefer-flat": "error",
|
|
46
|
+
/*
|
|
47
|
+
* Use .flatMap() to flatten an array and map the values instead of
|
|
48
|
+
* using .flat().map().
|
|
49
|
+
*
|
|
50
|
+
* https://www.npmjs.com/package/eslint-plugin-array-func#prefer-flat-map
|
|
51
|
+
*/
|
|
52
|
+
"array-func/prefer-flat-map": "error"
|
|
53
|
+
}
|
|
54
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Rules for spacing around async and await keywords
|
|
4
|
+
*
|
|
5
|
+
* https://www.npmjs.com/package/eslint-plugin-async-await
|
|
6
|
+
*/
|
|
7
|
+
module.exports = {
|
|
8
|
+
plugins: ["async-await"],
|
|
9
|
+
rules: {
|
|
10
|
+
/*
|
|
11
|
+
* Enforce space after async keyword
|
|
12
|
+
*
|
|
13
|
+
* https://www.npmjs.com/package/eslint-plugin-async-await#rules
|
|
14
|
+
*/
|
|
15
|
+
"async-await/space-after-async": "error",
|
|
16
|
+
/*
|
|
17
|
+
* Enforce space after await keyword
|
|
18
|
+
*
|
|
19
|
+
* https://www.npmjs.com/package/eslint-plugin-async-await#rules
|
|
20
|
+
*/
|
|
21
|
+
"async-await/space-after-await": "error"
|
|
22
|
+
}
|
|
23
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
plugins: string[];
|
|
3
|
+
rules: {
|
|
4
|
+
"css-modules/no-undef-class": (string | {
|
|
5
|
+
camelCase: boolean;
|
|
6
|
+
})[];
|
|
7
|
+
"css-modules/no-unused-class": (string | {
|
|
8
|
+
camelCase: boolean;
|
|
9
|
+
})[];
|
|
10
|
+
};
|
|
11
|
+
settings: {
|
|
12
|
+
"css-modules": {
|
|
13
|
+
basePath: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export = _default;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This plugin intends to help you in tracking down problems when you are using
|
|
4
|
+
* css-modules. It tells if you are using a non-existent css/scss/less class in
|
|
5
|
+
* js or if you forgot to use some classes which you declared in css/scss/less.
|
|
6
|
+
*
|
|
7
|
+
* https://www.npmjs.com/package/eslint-plugin-css-modules
|
|
8
|
+
*/
|
|
9
|
+
module.exports = {
|
|
10
|
+
plugins: ["css-modules"],
|
|
11
|
+
rules: {
|
|
12
|
+
/*
|
|
13
|
+
* You must not use a non existing class, or a property that hasn't been
|
|
14
|
+
* exported using the :export keyword.
|
|
15
|
+
*
|
|
16
|
+
* https://www.npmjs.com/package/eslint-plugin-css-modules#rules
|
|
17
|
+
*/
|
|
18
|
+
"css-modules/no-undef-class": [
|
|
19
|
+
"error",
|
|
20
|
+
{
|
|
21
|
+
camelCase: true
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
/*
|
|
25
|
+
* You must use all the classes defined in css/scss/less file.
|
|
26
|
+
*
|
|
27
|
+
* https://www.npmjs.com/package/eslint-plugin-css-modules#rules
|
|
28
|
+
*/
|
|
29
|
+
"css-modules/no-unused-class": [
|
|
30
|
+
"error",
|
|
31
|
+
{
|
|
32
|
+
camelCase: true
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
settings: {
|
|
37
|
+
"css-modules": {
|
|
38
|
+
basePath: "src"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
rules: {
|
|
3
|
+
"es/no-array-from": string;
|
|
4
|
+
"es/no-array-of": string;
|
|
5
|
+
"es/no-arrow-functions": string;
|
|
6
|
+
"es/no-binary-numeric-literals": string;
|
|
7
|
+
"es/no-block-scoped-functions": string;
|
|
8
|
+
"es/no-block-scoped-variables": string;
|
|
9
|
+
"es/no-classes": string;
|
|
10
|
+
"es/no-computed-properties": string;
|
|
11
|
+
"es/no-default-parameters": string;
|
|
12
|
+
"es/no-destructuring": string;
|
|
13
|
+
"es/no-for-of-loops": string;
|
|
14
|
+
"es/no-generators": string;
|
|
15
|
+
"es/no-map": string;
|
|
16
|
+
"es/no-math-acosh": string;
|
|
17
|
+
"es/no-math-asinh": string;
|
|
18
|
+
"es/no-math-atanh": string;
|
|
19
|
+
"es/no-math-cbrt": string;
|
|
20
|
+
"es/no-math-clz32": string;
|
|
21
|
+
"es/no-math-cosh": string;
|
|
22
|
+
"es/no-math-expm1": string;
|
|
23
|
+
"es/no-math-fround": string;
|
|
24
|
+
"es/no-math-hypot": string;
|
|
25
|
+
"es/no-math-imul": string;
|
|
26
|
+
"es/no-math-log10": string;
|
|
27
|
+
"es/no-math-log1p": string;
|
|
28
|
+
"es/no-math-log2": string;
|
|
29
|
+
"es/no-math-sign": string;
|
|
30
|
+
"es/no-math-sinh": string;
|
|
31
|
+
"es/no-math-tanh": string;
|
|
32
|
+
"es/no-math-trunc": string;
|
|
33
|
+
"es/no-modules": string;
|
|
34
|
+
"es/no-new-target": string;
|
|
35
|
+
"es/no-number-epsilon": string;
|
|
36
|
+
"es/no-number-isfinite": string;
|
|
37
|
+
"es/no-number-isinteger": string;
|
|
38
|
+
"es/no-number-isnan": string;
|
|
39
|
+
"es/no-number-issafeinteger": string;
|
|
40
|
+
"es/no-number-maxsafeinteger": string;
|
|
41
|
+
"es/no-number-minsafeinteger": string;
|
|
42
|
+
"es/no-number-parsefloat": string;
|
|
43
|
+
"es/no-number-parseint": string;
|
|
44
|
+
"es/no-object-assign": string;
|
|
45
|
+
"es/no-object-getownpropertysymbols": string;
|
|
46
|
+
"es/no-object-is": string;
|
|
47
|
+
"es/no-object-setprototypeof": string;
|
|
48
|
+
"es/no-object-super-properties": string;
|
|
49
|
+
"es/no-octal-numeric-literals": string;
|
|
50
|
+
"es/no-promise": string;
|
|
51
|
+
"es/no-property-shorthands": string;
|
|
52
|
+
"es/no-proxy": string;
|
|
53
|
+
"es/no-reflect": string;
|
|
54
|
+
"es/no-regexp-u-flag": string;
|
|
55
|
+
"es/no-regexp-y-flag": string;
|
|
56
|
+
"es/no-rest-parameters": string;
|
|
57
|
+
"es/no-set": string;
|
|
58
|
+
"es/no-spread-elements": string;
|
|
59
|
+
"es/no-string-fromcodepoint": string;
|
|
60
|
+
"es/no-string-raw": string;
|
|
61
|
+
"es/no-subclassing-builtins": string;
|
|
62
|
+
"es/no-symbol": string;
|
|
63
|
+
"es/no-template-literals": string;
|
|
64
|
+
"es/no-typed-arrays": string;
|
|
65
|
+
"es/no-unicode-codepoint-escapes": string;
|
|
66
|
+
"es/no-weak-map": string;
|
|
67
|
+
"es/no-weak-set": string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
export = _default;
|