@slashnephy/eslint-config 0.3.1 → 0.3.4
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/config.js +14 -0
- package/dist/emotion.js +6 -0
- package/dist/index.js +12 -12
- package/dist/javascript.js +6 -0
- package/dist/next.js.js +11 -0
- package/dist/{vite.js → node.js} +2 -2
- package/dist/react.js +9 -1
- package/dist/typescript.js +1 -1
- package/package.json +3 -11
package/dist/config.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const config = {
|
|
4
|
+
rules: {
|
|
5
|
+
'import/no-default-export': 'off',
|
|
6
|
+
'import/no-extraneous-dependencies': [
|
|
7
|
+
'error',
|
|
8
|
+
{
|
|
9
|
+
devDependencies: true,
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
module.exports = config;
|
package/dist/emotion.js
CHANGED
|
@@ -7,6 +7,12 @@ const emotion = {
|
|
|
7
7
|
'@emotion/styled-import': 'error',
|
|
8
8
|
'@emotion/syntax-preference': 'error',
|
|
9
9
|
'css-reorder/property-reorder': 'error',
|
|
10
|
+
'react/no-unknown-property': [
|
|
11
|
+
'error',
|
|
12
|
+
{
|
|
13
|
+
ignore: ['css'],
|
|
14
|
+
},
|
|
15
|
+
],
|
|
10
16
|
},
|
|
11
17
|
};
|
|
12
18
|
module.exports = emotion;
|
package/dist/index.js
CHANGED
|
@@ -25,9 +25,13 @@ const config = {
|
|
|
25
25
|
extends: (0, path_1.resolve)(__dirname, 'react.js'),
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
|
-
files: '**/*.{
|
|
28
|
+
files: '**/*.{jsx,tsx}',
|
|
29
29
|
extends: (0, path_1.resolve)(__dirname, 'emotion.js'),
|
|
30
30
|
},
|
|
31
|
+
{
|
|
32
|
+
files: '**/pages/**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx}',
|
|
33
|
+
extends: (0, path_1.resolve)(__dirname, 'next.js.js'),
|
|
34
|
+
},
|
|
31
35
|
{
|
|
32
36
|
files: '**/*.json',
|
|
33
37
|
extends: (0, path_1.resolve)(__dirname, 'json.js'),
|
|
@@ -44,20 +48,16 @@ const config = {
|
|
|
44
48
|
files: '**/*.user.js',
|
|
45
49
|
extends: (0, path_1.resolve)(__dirname, 'userscript.js'),
|
|
46
50
|
},
|
|
47
|
-
{
|
|
48
|
-
files: '**/vite.config.{js,ts}',
|
|
49
|
-
extends: (0, path_1.resolve)(__dirname, 'vite.js'),
|
|
50
|
-
},
|
|
51
51
|
{
|
|
52
52
|
files: [
|
|
53
|
-
'**/
|
|
54
|
-
'**/rollup.config.{js,ts}',
|
|
55
|
-
'**/vite.config.{js,ts}',
|
|
56
|
-
'**/pages/**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx}',
|
|
53
|
+
'**/bin/**/*.{js,mjs,cjs,ts,mts,cts}',
|
|
54
|
+
'**/{webpack,rollup,vite}.config.{js,mjs,cjs,ts,mts,cts}',
|
|
57
55
|
],
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
extends: (0, path_1.resolve)(__dirname, 'node.js'),
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
files: '**/{webpack,rollup,vite}.config.{js,mjs,cjs,ts,mts,cts}',
|
|
60
|
+
extends: (0, path_1.resolve)(__dirname, 'config.js'),
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
files: '**/*',
|
package/dist/javascript.js
CHANGED
|
@@ -65,6 +65,7 @@ const javascript = {
|
|
|
65
65
|
'node/no-extraneous-import': 'off',
|
|
66
66
|
'node/no-unpublished-import': 'off',
|
|
67
67
|
'import/no-import-module-exports': 'off',
|
|
68
|
+
'import/extensions': 'off',
|
|
68
69
|
'dot-notation': 'error',
|
|
69
70
|
'object-shorthand': ['error', 'always'],
|
|
70
71
|
'array-callback-return': ['error'],
|
|
@@ -80,6 +81,11 @@ const javascript = {
|
|
|
80
81
|
'require-atomic-updates': 'error',
|
|
81
82
|
'func-call-spacing': ['error', 'never'],
|
|
82
83
|
'accessor-pairs': 'error',
|
|
84
|
+
camelcase: 'off',
|
|
85
|
+
'default-case': 'off',
|
|
86
|
+
'import/prefer-default-export': 'off',
|
|
87
|
+
'no-continue': 'off',
|
|
88
|
+
'no-underscore-dangle': 'off',
|
|
83
89
|
},
|
|
84
90
|
};
|
|
85
91
|
module.exports = javascript;
|
package/dist/next.js.js
ADDED
package/dist/{vite.js → node.js}
RENAMED
package/dist/react.js
CHANGED
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const react = {
|
|
4
4
|
extends: [
|
|
5
5
|
'airbnb/hooks',
|
|
6
|
-
'next/core-web-vitals',
|
|
7
6
|
'plugin:react/recommended',
|
|
8
7
|
'plugin:react/jsx-runtime',
|
|
9
8
|
'plugin:css-import-order/recommended',
|
|
@@ -56,6 +55,15 @@ const react = {
|
|
|
56
55
|
reservedFirst: true,
|
|
57
56
|
},
|
|
58
57
|
],
|
|
58
|
+
'react/jsx-filename-extension': [
|
|
59
|
+
'error',
|
|
60
|
+
{
|
|
61
|
+
extensions: ['.jsx', '.tsx'],
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
'react/jsx-props-no-spreading': 'off',
|
|
65
|
+
'react/jsx-no-useless-fragment': 'off',
|
|
66
|
+
'react/require-default-props': 'off',
|
|
59
67
|
},
|
|
60
68
|
overrides: [
|
|
61
69
|
{
|
package/dist/typescript.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slashnephy/eslint-config",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": "SlashNephy <spica@starry.blue> (https://spica.starry.blue/)",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@emotion/eslint-plugin": "11.10.0",
|
|
34
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
35
|
-
"@typescript-eslint/parser": "5.
|
|
34
|
+
"@typescript-eslint/eslint-plugin": "5.53.0",
|
|
35
|
+
"@typescript-eslint/parser": "5.53.0",
|
|
36
36
|
"eslint-config-airbnb": "19.0.4",
|
|
37
37
|
"eslint-config-next": "13.2.1",
|
|
38
38
|
"eslint-config-prettier": "8.6.0",
|
|
@@ -77,14 +77,6 @@
|
|
|
77
77
|
"eslintConfig": {
|
|
78
78
|
"extends": [
|
|
79
79
|
"./dist/index.js"
|
|
80
|
-
],
|
|
81
|
-
"overrides": [
|
|
82
|
-
{
|
|
83
|
-
"files": "bin/*.ts",
|
|
84
|
-
"parserOptions": {
|
|
85
|
-
"project": "./tsconfig.node.json"
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
80
|
]
|
|
89
81
|
}
|
|
90
82
|
}
|