@mysetup/eslint-config 2.0.1-3 → 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/index.js +97 -97
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
const project = ["**/tsconfig.json"];
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
extends: [
|
|
5
|
-
"eslint:recommended",
|
|
6
|
-
"prettier",
|
|
7
|
-
"plugin:@next/next/core-web-vitals",
|
|
8
|
-
require.resolve("@vercel/style-guide/eslint/browser"),
|
|
9
|
-
require.resolve("@vercel/style-guide/eslint/node"),
|
|
10
|
-
require.resolve("@vercel/style-guide/eslint/react"),
|
|
11
|
-
],
|
|
12
|
-
plugins: ["prettier"],
|
|
13
|
-
rules: {
|
|
14
|
-
camelcase: "off",
|
|
15
|
-
"eslint-comments/require-description": "off",
|
|
16
|
-
"import/no-default-export": "off",
|
|
17
|
-
"jsx-a11y/anchor-is-valid": "off",
|
|
18
|
-
"@next/next/no-html-link-for-pages": "off",
|
|
19
|
-
"prettier/prettier": "error",
|
|
20
|
-
"react/button-has-type": "off",
|
|
21
|
-
"react/function-component-definition": [
|
|
22
|
-
"error",
|
|
23
|
-
{
|
|
24
|
-
namedComponents: ["arrow-function", "function-declaration"],
|
|
25
|
-
unnamedComponents: "arrow-function",
|
|
26
|
-
},
|
|
27
|
-
],
|
|
28
|
-
"react/jsx-key": "off",
|
|
29
|
-
"react/no-unescaped-entities": "off",
|
|
30
|
-
"unicorn/filename-case": "off",
|
|
31
|
-
},
|
|
32
|
-
ignorePatterns: ["build/", "coverage/", "dist/", "generated/", ".next/"],
|
|
33
|
-
overrides: [
|
|
34
|
-
{
|
|
35
|
-
files: ["*.ts", "*.tsx"],
|
|
36
|
-
extends: [require.resolve("@vercel/style-guide/eslint/typescript")],
|
|
37
|
-
parserOptions: {
|
|
38
|
-
project,
|
|
39
|
-
},
|
|
40
|
-
rules: {
|
|
41
|
-
"tsdoc/syntax": "off",
|
|
42
|
-
"@typescript-eslint/consistent-type-assertions": "off",
|
|
43
|
-
"@typescript-eslint/explicit-function-return-type": "off",
|
|
44
|
-
"@typescript-eslint/no-confusing-void-expression": "warn",
|
|
45
|
-
"@typescript-eslint/no-misused-promises": [
|
|
46
|
-
"error",
|
|
47
|
-
{
|
|
48
|
-
checksVoidReturn: false,
|
|
49
|
-
},
|
|
50
|
-
],
|
|
51
|
-
"@typescript-eslint/no-unnecessary-condition": "warn",
|
|
52
|
-
"@typescript-eslint/require-await": "off",
|
|
53
|
-
"@typescript-eslint/prefer-nullish-coalescing": "off",
|
|
54
|
-
"@typescript-eslint/restrict-template-expressions": "off",
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
files: [
|
|
59
|
-
"**/__fixtures__/*.ts",
|
|
60
|
-
"**/__mocks__/*.ts",
|
|
61
|
-
"*.test.ts",
|
|
62
|
-
"*.test.tsx",
|
|
63
|
-
],
|
|
64
|
-
extends: [require.resolve("@vercel/style-guide/eslint/jest")],
|
|
65
|
-
parserOptions: {
|
|
66
|
-
project,
|
|
67
|
-
},
|
|
68
|
-
rules: {
|
|
69
|
-
"jest/prefer-lowercase-title": "off",
|
|
70
|
-
"jest/no-mocks-import": "off",
|
|
71
|
-
"sonarjs/no-duplicate-string": "off",
|
|
72
|
-
"testing-library/no-container": "off",
|
|
73
|
-
"testing-library/render-result-naming-convention": "off",
|
|
74
|
-
"@typescript-eslint/no-non-null-assertion": "off",
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
files: ["*.stories.tsx"],
|
|
79
|
-
parserOptions: {
|
|
80
|
-
project,
|
|
81
|
-
},
|
|
82
|
-
rules: {
|
|
83
|
-
"@typescript-eslint/no-non-null-assertion": "off",
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
],
|
|
87
|
-
settings: {
|
|
88
|
-
react: {
|
|
89
|
-
version: "18.3.1",
|
|
90
|
-
},
|
|
91
|
-
"import/resolver": {
|
|
92
|
-
typescript: {
|
|
93
|
-
project: ["apps/*/tsconfig.json", "packages/*/tsconfig.json"],
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
};
|
|
1
|
+
const project = ["**/tsconfig.json"];
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
extends: [
|
|
5
|
+
"eslint:recommended",
|
|
6
|
+
"prettier",
|
|
7
|
+
"plugin:@next/next/core-web-vitals",
|
|
8
|
+
require.resolve("@vercel/style-guide/eslint/browser"),
|
|
9
|
+
require.resolve("@vercel/style-guide/eslint/node"),
|
|
10
|
+
require.resolve("@vercel/style-guide/eslint/react"),
|
|
11
|
+
],
|
|
12
|
+
plugins: ["prettier"],
|
|
13
|
+
rules: {
|
|
14
|
+
camelcase: "off",
|
|
15
|
+
"eslint-comments/require-description": "off",
|
|
16
|
+
"import/no-default-export": "off",
|
|
17
|
+
"jsx-a11y/anchor-is-valid": "off",
|
|
18
|
+
"@next/next/no-html-link-for-pages": "off",
|
|
19
|
+
"prettier/prettier": "error",
|
|
20
|
+
"react/button-has-type": "off",
|
|
21
|
+
"react/function-component-definition": [
|
|
22
|
+
"error",
|
|
23
|
+
{
|
|
24
|
+
namedComponents: ["arrow-function", "function-declaration"],
|
|
25
|
+
unnamedComponents: "arrow-function",
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
"react/jsx-key": "off",
|
|
29
|
+
"react/no-unescaped-entities": "off",
|
|
30
|
+
"unicorn/filename-case": "off",
|
|
31
|
+
},
|
|
32
|
+
ignorePatterns: ["build/", "coverage/", "dist/", "generated/", ".next/"],
|
|
33
|
+
overrides: [
|
|
34
|
+
{
|
|
35
|
+
files: ["*.ts", "*.tsx"],
|
|
36
|
+
extends: [require.resolve("@vercel/style-guide/eslint/typescript")],
|
|
37
|
+
parserOptions: {
|
|
38
|
+
project,
|
|
39
|
+
},
|
|
40
|
+
rules: {
|
|
41
|
+
"tsdoc/syntax": "off",
|
|
42
|
+
"@typescript-eslint/consistent-type-assertions": "off",
|
|
43
|
+
"@typescript-eslint/explicit-function-return-type": "off",
|
|
44
|
+
"@typescript-eslint/no-confusing-void-expression": "warn",
|
|
45
|
+
"@typescript-eslint/no-misused-promises": [
|
|
46
|
+
"error",
|
|
47
|
+
{
|
|
48
|
+
checksVoidReturn: false,
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
"@typescript-eslint/no-unnecessary-condition": "warn",
|
|
52
|
+
"@typescript-eslint/require-await": "off",
|
|
53
|
+
"@typescript-eslint/prefer-nullish-coalescing": "off",
|
|
54
|
+
"@typescript-eslint/restrict-template-expressions": "off",
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
files: [
|
|
59
|
+
"**/__fixtures__/*.ts",
|
|
60
|
+
"**/__mocks__/*.ts",
|
|
61
|
+
"*.test.ts",
|
|
62
|
+
"*.test.tsx",
|
|
63
|
+
],
|
|
64
|
+
extends: [require.resolve("@vercel/style-guide/eslint/jest")],
|
|
65
|
+
parserOptions: {
|
|
66
|
+
project,
|
|
67
|
+
},
|
|
68
|
+
rules: {
|
|
69
|
+
"jest/prefer-lowercase-title": "off",
|
|
70
|
+
"jest/no-mocks-import": "off",
|
|
71
|
+
"sonarjs/no-duplicate-string": "off",
|
|
72
|
+
"testing-library/no-container": "off",
|
|
73
|
+
"testing-library/render-result-naming-convention": "off",
|
|
74
|
+
"@typescript-eslint/no-non-null-assertion": "off",
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
files: ["*.stories.tsx"],
|
|
79
|
+
parserOptions: {
|
|
80
|
+
project,
|
|
81
|
+
},
|
|
82
|
+
rules: {
|
|
83
|
+
"@typescript-eslint/no-non-null-assertion": "off",
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
settings: {
|
|
88
|
+
react: {
|
|
89
|
+
version: "18.3.1",
|
|
90
|
+
},
|
|
91
|
+
"import/resolver": {
|
|
92
|
+
typescript: {
|
|
93
|
+
project: ["apps/*/tsconfig.json", "packages/*/tsconfig.json"],
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
};
|