@fullstacksjs/eslint-config 9.3.1 → 9.5.0
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/base.js +1 -1
- package/graphql.js +1 -0
- package/index.js +2 -0
- package/init.d.ts +3 -1
- package/init.js +27 -22
- package/package.json +10 -7
- package/registerOpts.js +2 -0
- package/tailwind.js +15 -0
package/base.js
CHANGED
|
@@ -199,7 +199,7 @@ module.exports = {
|
|
|
199
199
|
'prefer-named-capture-group': 'off',
|
|
200
200
|
'prefer-numeric-literals': 'error',
|
|
201
201
|
'prefer-object-has-own': 'warn',
|
|
202
|
-
'prefer-object-spread': '
|
|
202
|
+
'prefer-object-spread': 'off',
|
|
203
203
|
'prefer-promise-reject-errors': 'off',
|
|
204
204
|
'prefer-regex-literals': 'off',
|
|
205
205
|
'prefer-rest-params': 'error',
|
package/graphql.js
CHANGED
|
@@ -52,6 +52,7 @@ module.exports = {
|
|
|
52
52
|
'@graphql-eslint/require-id-when-available': 'warn',
|
|
53
53
|
'@graphql-eslint/require-import-fragment': 'off',
|
|
54
54
|
'@graphql-eslint/require-nullable-fields-with-oneof': 'warn',
|
|
55
|
+
'@graphql-eslint/require-nullable-result-in-root': 'off',
|
|
55
56
|
'@graphql-eslint/require-type-pattern-with-oneof': 'warn',
|
|
56
57
|
'@graphql-eslint/scalar-leafs': 'warn',
|
|
57
58
|
'@graphql-eslint/selection-set-depth': 'off',
|
package/index.js
CHANGED
|
@@ -10,7 +10,9 @@ module.exports = {
|
|
|
10
10
|
require.resolve('./promise'),
|
|
11
11
|
require.resolve('./storybook'),
|
|
12
12
|
require.resolve('./jest'),
|
|
13
|
+
global.fullstacksjs?.tailwind && require.resolve('./tailwind'),
|
|
13
14
|
global.fullstacksjs?.react && require.resolve('./react'),
|
|
15
|
+
global.fullstacksjs?.next && require.resolve('./next'),
|
|
14
16
|
global.fullstacksjs?.typescript && require.resolve('./typescript'),
|
|
15
17
|
global.fullstacksjs?.cypress && require.resolve('./cypress'),
|
|
16
18
|
require.resolve('./prettier'),
|
package/init.d.ts
CHANGED
|
@@ -2,8 +2,10 @@ type Config = import('eslint').Linter.Config;
|
|
|
2
2
|
export interface Options extends Config {
|
|
3
3
|
modules: {
|
|
4
4
|
auto?: boolean;
|
|
5
|
-
react?:
|
|
5
|
+
react?: boolean;
|
|
6
|
+
next?: boolean;
|
|
6
7
|
typescript?: { parserProject: string[] | string; resolverProject: string[] | string };
|
|
8
|
+
tailwind?: boolean;
|
|
7
9
|
node?: boolean;
|
|
8
10
|
strict?: boolean;
|
|
9
11
|
import?: boolean;
|
package/init.js
CHANGED
|
@@ -13,28 +13,33 @@ function init(opts = {}) {
|
|
|
13
13
|
opts = global.fullstacksjs;
|
|
14
14
|
|
|
15
15
|
/** @type { import('eslint').Linter.Config } */
|
|
16
|
-
const config =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
16
|
+
const config = Object.assign(
|
|
17
|
+
{
|
|
18
|
+
extends: [
|
|
19
|
+
require.resolve('./base'),
|
|
20
|
+
require.resolve('./promise'),
|
|
21
|
+
require.resolve('./fp'),
|
|
22
|
+
opts.tailwind && require.resolve('./tailwind'),
|
|
23
|
+
opts.node && require.resolve('./node'),
|
|
24
|
+
opts.graphql && require.resolve('./graphql'),
|
|
25
|
+
opts.import && require.resolve('./import'),
|
|
26
|
+
opts.typescript && require.resolve('./typescript'),
|
|
27
|
+
opts.react && require.resolve('./react.js'),
|
|
28
|
+
opts.next && require.resolve('./next.js'),
|
|
29
|
+
opts.storybook && require.resolve('./storybook'),
|
|
30
|
+
opts.cypress && require.resolve('./cypress'),
|
|
31
|
+
opts.test && require.resolve('./jest'),
|
|
32
|
+
opts.esm && require.resolve('./esm'),
|
|
33
|
+
opts.strict && require.resolve('./strict'),
|
|
34
|
+
require.resolve('./prettier'),
|
|
35
|
+
]
|
|
36
|
+
.concat(extraExtends)
|
|
37
|
+
.filter(Boolean),
|
|
38
|
+
parserOptions: {},
|
|
39
|
+
settings: {},
|
|
40
|
+
},
|
|
41
|
+
eslintConfig,
|
|
42
|
+
);
|
|
38
43
|
|
|
39
44
|
if (opts.typescript?.parserProject) {
|
|
40
45
|
config.parserOptions = merge(config.parserOptions, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fullstacksjs/eslint-config",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.5.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "fullstacks <fullstacksjs@gmail.com>",
|
|
6
6
|
"description": "fullstacks eslint config",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"prettier.js",
|
|
29
29
|
"promise.js",
|
|
30
30
|
"react.js",
|
|
31
|
+
"tailwind.js",
|
|
31
32
|
"registerOpts.js",
|
|
32
33
|
"storybook.js",
|
|
33
34
|
"strict.js",
|
|
@@ -47,10 +48,11 @@
|
|
|
47
48
|
"main": "index.js",
|
|
48
49
|
"dependencies": {
|
|
49
50
|
"@fullstacksjs/toolbox": "3.0.2",
|
|
50
|
-
"@graphql-eslint/eslint-plugin": "3.
|
|
51
|
-
"@typescript-eslint/eslint-plugin": "5.59.
|
|
52
|
-
"@typescript-eslint/parser": "5.59.
|
|
51
|
+
"@graphql-eslint/eslint-plugin": "3.19.1",
|
|
52
|
+
"@typescript-eslint/eslint-plugin": "5.59.7",
|
|
53
|
+
"@typescript-eslint/parser": "5.59.7",
|
|
53
54
|
"deepmerge": "4.3.1",
|
|
55
|
+
"eslint-config-next": "13.4.4",
|
|
54
56
|
"eslint-config-prettier": "8.8.0",
|
|
55
57
|
"eslint-import-resolver-typescript": "3.5.5",
|
|
56
58
|
"eslint-plugin-cypress": "2.13.3",
|
|
@@ -66,14 +68,15 @@
|
|
|
66
68
|
"eslint-plugin-react-hooks": "4.6.0",
|
|
67
69
|
"eslint-plugin-simple-import-sort": "10.0.0",
|
|
68
70
|
"eslint-plugin-storybook": "0.6.12",
|
|
71
|
+
"eslint-plugin-tailwindcss": "3.12.1",
|
|
69
72
|
"read-pkg-up": "7.0.1"
|
|
70
73
|
},
|
|
71
74
|
"devDependencies": {
|
|
72
|
-
"@semantic-release/github": "8.0
|
|
75
|
+
"@semantic-release/github": "8.1.0",
|
|
73
76
|
"@semantic-release/npm": "10.0.3",
|
|
74
|
-
"@semantic-release/release-notes-generator": "11.0.
|
|
77
|
+
"@semantic-release/release-notes-generator": "11.0.2",
|
|
75
78
|
"cspell": "6.31.1",
|
|
76
|
-
"eslint": "8.
|
|
79
|
+
"eslint": "8.41.0",
|
|
77
80
|
"eslint-find-rules": "4.1.0",
|
|
78
81
|
"husky": "8.0.3",
|
|
79
82
|
"lint-staged": "13.2.2",
|
package/registerOpts.js
CHANGED
|
@@ -6,9 +6,11 @@ const defaultOptions = {
|
|
|
6
6
|
cypress: hasDep('cypress'),
|
|
7
7
|
graphql: hasDep('graphql'),
|
|
8
8
|
react: hasDep('react'),
|
|
9
|
+
next: hasDep('next'),
|
|
9
10
|
storybook: hasDep('@storybook/react'),
|
|
10
11
|
test: hasDep('jest') || hasDep('vitest'),
|
|
11
12
|
typescript: hasDep('typescript'),
|
|
13
|
+
tailwind: hasDep('tailwindcss'),
|
|
12
14
|
import: true,
|
|
13
15
|
node: true,
|
|
14
16
|
};
|
package/tailwind.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @type { import('eslint').Linter.Config }
|
|
3
|
+
*/
|
|
4
|
+
module.exports = {
|
|
5
|
+
plugins: ['tailwindcss'],
|
|
6
|
+
rules: {
|
|
7
|
+
'tailwindcss/classnames-order': 'warn',
|
|
8
|
+
'tailwindcss/enforces-negative-arbitrary-values': 'warn',
|
|
9
|
+
'tailwindcss/enforces-shorthand': 'warn',
|
|
10
|
+
'tailwindcss/migration-from-tailwind-2': 'warn',
|
|
11
|
+
'tailwindcss/no-arbitrary-value': 'off',
|
|
12
|
+
'tailwindcss/no-custom-classname': 'off',
|
|
13
|
+
'tailwindcss/no-contradicting-classname': 'error',
|
|
14
|
+
},
|
|
15
|
+
};
|