@slashnephy/eslint-config 0.2.42 → 0.3.1

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.
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const emotion = {
4
+ plugins: ['@emotion', 'css-reorder'],
5
+ rules: {
6
+ '@emotion/pkg-renaming': 'error',
7
+ '@emotion/styled-import': 'error',
8
+ '@emotion/syntax-preference': 'error',
9
+ 'css-reorder/property-reorder': 'error',
10
+ },
11
+ };
12
+ module.exports = emotion;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const path_1 = require("path");
4
4
  const config = {
5
5
  root: true,
6
- extends: ['eslint:recommended'],
6
+ extends: ['eslint:recommended', 'airbnb'],
7
7
  overrides: [
8
8
  {
9
9
  files: '**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx}',
@@ -18,12 +18,16 @@ const config = {
18
18
  '**/*.test.{js,mjs,cjs,jsx,ts,mts,cts,tsx}',
19
19
  '**/test/**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx}',
20
20
  ],
21
- extends: (0, path_1.resolve)(__dirname, 'jest.js'),
21
+ extends: [(0, path_1.resolve)(__dirname, 'jest.js'), (0, path_1.resolve)(__dirname, 'vitest.js')],
22
22
  },
23
23
  {
24
24
  files: '**/*.{jsx,tsx}',
25
25
  extends: (0, path_1.resolve)(__dirname, 'react.js'),
26
26
  },
27
+ {
28
+ files: '**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx}',
29
+ extends: (0, path_1.resolve)(__dirname, 'emotion.js'),
30
+ },
27
31
  {
28
32
  files: '**/*.json',
29
33
  extends: (0, path_1.resolve)(__dirname, 'json.js'),
@@ -40,10 +44,15 @@ const config = {
40
44
  files: '**/*.user.js',
41
45
  extends: (0, path_1.resolve)(__dirname, 'userscript.js'),
42
46
  },
47
+ {
48
+ files: '**/vite.config.{js,ts}',
49
+ extends: (0, path_1.resolve)(__dirname, 'vite.js'),
50
+ },
43
51
  {
44
52
  files: [
45
53
  '**/webpack.config.{js,ts}',
46
54
  '**/rollup.config.{js,ts}',
55
+ '**/vite.config.{js,ts}',
47
56
  '**/pages/**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx}',
48
57
  ],
49
58
  rules: {
@@ -64,6 +64,7 @@ const javascript = {
64
64
  'node/no-missing-import': 'off',
65
65
  'node/no-extraneous-import': 'off',
66
66
  'node/no-unpublished-import': 'off',
67
+ 'import/no-import-module-exports': 'off',
67
68
  'dot-notation': 'error',
68
69
  'object-shorthand': ['error', 'always'],
69
70
  'array-callback-return': ['error'],
@@ -2,10 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const react = {
4
4
  extends: [
5
+ 'airbnb/hooks',
5
6
  'next/core-web-vitals',
6
7
  'plugin:react/recommended',
7
8
  'plugin:react/jsx-runtime',
8
9
  'plugin:css-import-order/recommended',
10
+ 'plugin:jsx-a11y/recommended',
9
11
  ],
10
12
  plugins: ['css-import-order'],
11
13
  parserOptions: {
@@ -42,6 +44,18 @@ const react = {
42
44
  },
43
45
  ],
44
46
  'react/jsx-handler-names': 'error',
47
+ 'react/hook-use-state': 'error',
48
+ 'react/jsx-fragments': 'error',
49
+ 'react/prefer-stateless-function': 'error',
50
+ 'react/jsx-sort-props': [
51
+ 'error',
52
+ {
53
+ callbacksLast: true,
54
+ shorthandFirst: true,
55
+ multiline: 'last',
56
+ reservedFirst: true,
57
+ },
58
+ ],
45
59
  },
46
60
  overrides: [
47
61
  {
@@ -8,7 +8,7 @@ const typescript = {
8
8
  'plugin:import/typescript',
9
9
  'plugin:no-void-return-type/recommended',
10
10
  ],
11
- plugins: ['@typescript-eslint'],
11
+ plugins: ['@typescript-eslint', 'deprecation'],
12
12
  parser: '@typescript-eslint/parser',
13
13
  parserOptions: {
14
14
  sourceType: 'module',
@@ -43,13 +43,13 @@ const typescript = {
43
43
  },
44
44
  {
45
45
  selector: ['variableLike'],
46
- format: ['strictCamelCase'],
46
+ format: ['strictCamelCase', 'StrictPascalCase'],
47
47
  leadingUnderscore: 'allow',
48
48
  },
49
49
  {
50
50
  selector: ['variable'],
51
51
  modifiers: ['const', 'global', 'exported'],
52
- format: ['strictCamelCase', 'UPPER_CASE', 'StrictPascalCase'],
52
+ format: ['strictCamelCase', 'StrictPascalCase', 'UPPER_CASE'],
53
53
  },
54
54
  {
55
55
  selector: ['property'],
@@ -139,6 +139,7 @@ const typescript = {
139
139
  '@typescript-eslint/no-unsafe-return': 'off',
140
140
  '@typescript-eslint/no-unsafe-argument': 'off',
141
141
  '@typescript-eslint/restrict-template-expressions': 'off',
142
+ 'deprecation/deprecation': 'error',
142
143
  },
143
144
  };
144
145
  module.exports = typescript;
package/dist/vite.js ADDED
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const vite = {
4
+ parserOptions: {
5
+ project: './tsconfig.node.json',
6
+ },
7
+ };
8
+ module.exports = vite;
package/dist/vitest.js ADDED
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const vitest = {
4
+ plugins: ['vitest'],
5
+ rules: {},
6
+ };
7
+ module.exports = vitest;
package/package.json CHANGED
@@ -1,6 +1,8 @@
1
1
  {
2
2
  "name": "@slashnephy/eslint-config",
3
- "version": "0.2.42",
3
+ "version": "0.3.1",
4
+ "type": "commonjs",
5
+ "main": "dist/index.js",
4
6
  "author": "SlashNephy <spica@starry.blue> (https://spica.starry.blue/)",
5
7
  "repository": {
6
8
  "type": "git",
@@ -8,10 +10,9 @@
8
10
  "directory": "env/eslint"
9
11
  },
10
12
  "license": "MIT",
11
- "main": "dist/src/index.js",
12
13
  "files": [
13
14
  "package.json",
14
- "dist/src/*.js"
15
+ "dist/*.js"
15
16
  ],
16
17
  "publishConfig": {
17
18
  "access": "public"
@@ -29,49 +30,61 @@
29
30
  "publish": "yarn clean && yarn build && yarn npm publish"
30
31
  },
31
32
  "dependencies": {
32
- "@typescript-eslint/eslint-plugin": "5.48.2",
33
- "@typescript-eslint/parser": "5.48.2",
34
- "eslint-config-next": "13.1.4",
33
+ "@emotion/eslint-plugin": "11.10.0",
34
+ "@typescript-eslint/eslint-plugin": "5.52.0",
35
+ "@typescript-eslint/parser": "5.52.0",
36
+ "eslint-config-airbnb": "19.0.4",
37
+ "eslint-config-next": "13.2.1",
35
38
  "eslint-config-prettier": "8.6.0",
36
39
  "eslint-import-resolver-typescript": "3.5.3",
37
40
  "eslint-plugin-css-import-order": "1.1.0",
41
+ "eslint-plugin-css-reorder": "0.5.1",
42
+ "eslint-plugin-deprecation": "1.3.3",
38
43
  "eslint-plugin-editorconfig": "4.0.2",
39
44
  "eslint-plugin-eslint-comments": "3.2.0",
40
45
  "eslint-plugin-import": "2.27.5",
41
46
  "eslint-plugin-jest": "27.2.1",
42
47
  "eslint-plugin-jest-formatting": "3.1.0",
43
48
  "eslint-plugin-json": "3.1.0",
49
+ "eslint-plugin-jsx-a11y": "6.7.1",
44
50
  "eslint-plugin-no-void-return-type": "1.0.2",
45
51
  "eslint-plugin-node": "11.1.0",
46
52
  "eslint-plugin-package-json": "0.1.4",
47
53
  "eslint-plugin-promise": "6.1.1",
48
- "eslint-plugin-react": "7.32.1",
54
+ "eslint-plugin-react": "7.32.2",
49
55
  "eslint-plugin-react-hooks": "4.6.0",
50
56
  "eslint-plugin-unused-imports": "2.0.0",
51
- "eslint-plugin-userscripts": "0.2.10",
57
+ "eslint-plugin-userscripts": "0.2.11",
58
+ "eslint-plugin-vitest": "0.0.46",
52
59
  "eslint-plugin-xss": "0.1.12",
53
- "eslint-plugin-yml": "1.4.0"
60
+ "eslint-plugin-yml": "1.5.0",
61
+ "typescript": "4.9.5"
54
62
  },
55
63
  "peerDependencies": {
56
64
  "eslint": "^8",
57
- "prettier": "^2",
58
- "typescript": "^4"
65
+ "prettier": "^2"
59
66
  },
60
67
  "devDependencies": {
61
- "@slashnephy/prettier-config": "0.1.8",
62
- "@types/eslint": "8.4.10",
63
- "@types/node": "18.11.18",
64
- "@types/prettier": "2.7.2",
68
+ "@slashnephy/prettier-config": "0.1.16",
69
+ "@types/eslint": "8.21.1",
70
+ "@types/node": "18.14.2",
65
71
  "concurrently": "7.6.0",
66
- "eslint": "8.32.0",
67
- "prettier": "2.8.3",
68
- "ts-node": "10.9.1",
69
- "typescript": "4.9.4"
72
+ "eslint": "8.35.0",
73
+ "prettier": "2.8.4",
74
+ "ts-node": "10.9.1"
70
75
  },
71
- "packageManager": "yarn@3.3.1",
76
+ "packageManager": "yarn@3.4.1",
72
77
  "eslintConfig": {
73
78
  "extends": [
74
- "./dist/src/index.js"
79
+ "./dist/index.js"
80
+ ],
81
+ "overrides": [
82
+ {
83
+ "files": "bin/*.ts",
84
+ "parserOptions": {
85
+ "project": "./tsconfig.node.json"
86
+ }
87
+ }
75
88
  ]
76
89
  }
77
90
  }
File without changes
File without changes
@@ -12,13 +12,13 @@ const packageJson = {
12
12
  [
13
13
  'name',
14
14
  'version',
15
+ 'type',
16
+ 'main',
17
+ 'private',
15
18
  'author',
16
19
  'description',
17
20
  'repository',
18
21
  'license',
19
- 'private',
20
- 'type',
21
- 'main',
22
22
  'files',
23
23
  'publishConfig',
24
24
  'scripts',
File without changes
File without changes
File without changes