@omer-x/eslint-config 2.0.0 → 2.0.2
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/dist/base.js +3 -1
- package/dist/import.js +2 -0
- package/dist/index.js +7 -7
- package/dist/jsx-a11y.js +6 -1
- package/dist/react.js +2 -1
- package/dist/stylistic.js +2 -0
- package/dist/typescript.js +10 -2
- package/dist/unused-imports.js +2 -0
- package/package.json +1 -1
package/dist/base.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import eslint from "@eslint/js";
|
|
2
2
|
export default [
|
|
3
|
-
eslint.configs.recommended,
|
|
4
3
|
{
|
|
4
|
+
files: ["src/**/*.+(js|jsx)", "./*.+(js|jsx)"],
|
|
5
|
+
ignores: ["node_modules/"],
|
|
5
6
|
rules: {
|
|
7
|
+
...eslint.configs.recommended.rules,
|
|
6
8
|
"array-callback-return": "error",
|
|
7
9
|
"class-methods-use-this": "error",
|
|
8
10
|
"curly": ["error", "multi-line", "consistent"],
|
package/dist/import.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import base from "./base";
|
|
2
|
-
import importPlugin from "./import";
|
|
3
|
-
import jsxAccessibility from "./jsx-a11y";
|
|
4
|
-
import react from "./react";
|
|
5
|
-
import stylistic from "./stylistic";
|
|
6
|
-
import typescript from "./typescript";
|
|
7
|
-
import unusedImports from "./unused-imports";
|
|
1
|
+
import base from "./base.js";
|
|
2
|
+
import importPlugin from "./import.js";
|
|
3
|
+
import jsxAccessibility from "./jsx-a11y.js";
|
|
4
|
+
import react from "./react.js";
|
|
5
|
+
import stylistic from "./stylistic.js";
|
|
6
|
+
import typescript from "./typescript.js";
|
|
7
|
+
import unusedImports from "./unused-imports.js";
|
|
8
8
|
export default [
|
|
9
9
|
...base,
|
|
10
10
|
...stylistic,
|
package/dist/jsx-a11y.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import jsxA11y from "eslint-plugin-jsx-a11y";
|
|
2
2
|
export default [
|
|
3
|
-
jsxA11y.flatConfigs.recommended,
|
|
4
3
|
{
|
|
4
|
+
files: ["src/**/*.+(jsx|tsx)", "./*.+(jsx|tsx)"],
|
|
5
|
+
ignores: ["node_modules/"],
|
|
6
|
+
plugins: {
|
|
7
|
+
"jsx-a11y": jsxA11y,
|
|
8
|
+
},
|
|
5
9
|
rules: {
|
|
10
|
+
...jsxA11y.flatConfigs.recommended.rules,
|
|
6
11
|
"jsx-a11y/no-autofocus": "off",
|
|
7
12
|
},
|
|
8
13
|
},
|
package/dist/react.js
CHANGED
|
@@ -2,7 +2,8 @@ import react from "eslint-plugin-react";
|
|
|
2
2
|
import globals from "globals";
|
|
3
3
|
export default [
|
|
4
4
|
{
|
|
5
|
-
files: ["
|
|
5
|
+
files: ["src/**/*.+(jsx|tsx)", "./*.+(jsx|tsx)"],
|
|
6
|
+
ignores: ["node_modules/"],
|
|
6
7
|
languageOptions: {
|
|
7
8
|
globals: {
|
|
8
9
|
...globals.browser,
|
package/dist/stylistic.js
CHANGED
package/dist/typescript.js
CHANGED
|
@@ -1,16 +1,23 @@
|
|
|
1
|
+
import plugin from "@typescript-eslint/eslint-plugin";
|
|
1
2
|
import parser from "@typescript-eslint/parser";
|
|
2
3
|
import tseslint from "typescript-eslint";
|
|
4
|
+
import base from "./base.js";
|
|
3
5
|
export default [
|
|
4
|
-
...tseslint.configs.recommended,
|
|
5
6
|
{
|
|
6
|
-
files: ["
|
|
7
|
+
files: ["src/**/*.+(ts|tsx)", "./*.+(ts|tsx)"],
|
|
8
|
+
ignores: ["node_modules/"],
|
|
7
9
|
languageOptions: {
|
|
8
10
|
parser,
|
|
9
11
|
parserOptions: {
|
|
10
12
|
project: "./tsconfig.json",
|
|
11
13
|
},
|
|
12
14
|
},
|
|
15
|
+
plugins: {
|
|
16
|
+
"@typescript-eslint": plugin,
|
|
17
|
+
},
|
|
13
18
|
rules: {
|
|
19
|
+
...base.map(c => c.rules).reduce((acc, val) => ({ ...acc, ...val }), {}),
|
|
20
|
+
...tseslint.configs.recommended.map(c => c.rules).reduce((acc, val) => ({ ...acc, ...val }), {}),
|
|
14
21
|
"@typescript-eslint/adjacent-overload-signatures": "error",
|
|
15
22
|
"@typescript-eslint/array-type": "error",
|
|
16
23
|
"@typescript-eslint/ban-ts-comment": "warn",
|
|
@@ -32,6 +39,7 @@ export default [
|
|
|
32
39
|
"@typescript-eslint/prefer-string-starts-ends-with": "error",
|
|
33
40
|
"class-methods-use-this": "off",
|
|
34
41
|
"dot-notation": "off",
|
|
42
|
+
"no-console": "warn",
|
|
35
43
|
},
|
|
36
44
|
},
|
|
37
45
|
];
|
package/dist/unused-imports.js
CHANGED