@willbooster/eslint-config-js-react 12.0.1 → 12.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.
Files changed (2) hide show
  1. package/package.json +17 -47
  2. package/eslint.config.js +0 -189
package/package.json CHANGED
@@ -1,76 +1,46 @@
1
1
  {
2
2
  "name": "@willbooster/eslint-config-js-react",
3
- "version": "12.0.1",
3
+ "version": "12.0.2",
4
4
  "description": "ESLint flat config for JavaScript React projects",
5
- "license": "Apache-2.0",
6
- "author": "WillBooster Inc.",
7
5
  "repository": {
8
6
  "type": "git",
9
7
  "url": "git+https://github.com/WillBooster/willbooster-configs.git",
10
8
  "directory": "packages/eslint-config-js-react"
11
9
  },
10
+ "license": "Apache-2.0",
11
+ "author": "WillBooster Inc.",
12
+ "type": "module",
13
+ "main": "eslint.config.js",
14
+ "types": "eslint.config.d.ts",
12
15
  "files": [
13
16
  "eslint.config.d.ts",
14
17
  "eslint.config.js"
15
18
  ],
16
- "type": "module",
17
- "main": "eslint.config.js",
18
- "types": "eslint.config.d.ts",
19
- "publishConfig": {
20
- "access": "public"
21
- },
22
19
  "scripts": {
23
20
  "check-all-for-ai": "yarn check-for-ai && yarn test",
24
21
  "check-for-ai": "yarn install > /dev/null && yarn format > /dev/null 2> /dev/null || true && yarn lint-fix --quiet",
25
22
  "cleanup": "yarn format && yarn lint-fix",
26
- "format": "sort-package-json && yarn format-code && yarn prettify",
27
- "format-code": "oxfmt --write --no-error-on-unmatched-pattern .",
23
+ "format": "sort-package-json && yarn format-code",
24
+ "format-code": "oxfmt --write --no-error-on-unmatched-pattern . '!**/package.json'",
28
25
  "lint": "oxlint --no-error-on-unmatched-pattern .",
29
26
  "lint-fix": "yarn lint --fix",
30
- "prettify": "prettier --cache --color --no-error-on-unmatched-pattern --write \"**/{.*/,}*.{java}\" \"!**/test{-,/}fixtures/**\" || true",
31
27
  "test": "yarn lint"
32
28
  },
33
29
  "devDependencies": {
34
- "@eslint-react/eslint-plugin": "4.2.3",
35
- "@eslint/js": "10.0.1",
36
30
  "@tsconfig/node-lts": "24.0.0",
37
31
  "@tsconfig/node-ts": "23.6.4",
38
- "@willbooster/prettier-config": "10.4.0",
39
- "eslint": "10.2.0",
40
- "eslint-config-flat-gitignore": "2.3.0",
41
- "eslint-config-prettier": "10.1.8",
42
- "eslint-plugin-import-x": "4.16.2",
43
- "eslint-plugin-perfectionist": "5.8.0",
44
- "eslint-plugin-react-compiler": "19.1.0-rc.2",
45
- "eslint-plugin-sort-class-members": "1.21.0",
46
- "eslint-plugin-sort-destructure-keys": "3.0.0",
47
- "eslint-plugin-unicorn": "64.0.0",
48
- "eslint-plugin-unused-imports": "4.4.1",
49
- "globals": "17.4.0",
50
- "micromatch": "4.0.8",
51
- "oxfmt": "0.45.0",
52
- "oxlint": "1.60.0",
53
- "oxlint-tsgolint": "0.21.0",
54
- "prettier": "3.8.1",
55
- "prettier-plugin-java": "2.8.1",
56
- "react": "19.2.4",
32
+ "@willbooster/oxfmt-config": "1.2.2",
33
+ "@willbooster/oxlint-config": "1.4.5",
34
+ "oxfmt": "0.46.0",
35
+ "oxlint": "1.61.0",
36
+ "oxlint-tsgolint": "0.22.0",
37
+ "react": "19.2.5",
57
38
  "sort-package-json": "3.6.1"
58
39
  },
59
40
  "peerDependencies": {
60
- "@eslint-react/eslint-plugin": ">=4.2.3",
61
- "@eslint/js": ">=10",
62
- "eslint": ">=10",
63
- "eslint-config-flat-gitignore": ">=2.1",
64
- "eslint-config-prettier": ">=10",
65
- "eslint-plugin-import-x": ">=4",
66
- "eslint-plugin-perfectionist": ">=5.8",
67
- "eslint-plugin-react-compiler": ">=19.1.0-rc.2",
68
- "eslint-plugin-sort-class-members": ">=1.21",
69
- "eslint-plugin-sort-destructure-keys": ">=2",
70
- "eslint-plugin-unicorn": ">=57",
71
- "eslint-plugin-unused-imports": ">=4",
72
- "globals": ">=16",
73
41
  "typescript": ">=5"
74
42
  },
75
- "prettier": "@willbooster/prettier-config"
43
+ "publishConfig": {
44
+ "access": "public"
45
+ }
76
46
  }
package/eslint.config.js DELETED
@@ -1,189 +0,0 @@
1
- import js from '@eslint/js';
2
- import eslintPluginReact from '@eslint-react/eslint-plugin';
3
- import eslintConfigFlatGitignore from 'eslint-config-flat-gitignore';
4
- import eslintConfigPrettier from 'eslint-config-prettier';
5
- import eslintPluginImportX from 'eslint-plugin-import-x';
6
- import eslintPluginPerfectionist from 'eslint-plugin-perfectionist';
7
- import eslintPluginReactCompiler from 'eslint-plugin-react-compiler';
8
- import eslintPluginSortClassMembers from 'eslint-plugin-sort-class-members';
9
- import eslintPluginSortDestructureKeys from 'eslint-plugin-sort-destructure-keys';
10
- import eslintPluginUnicorn from 'eslint-plugin-unicorn';
11
- import eslintPluginUnusedImports from 'eslint-plugin-unused-imports';
12
- import globals from 'globals';
13
-
14
- /** Copied from `packages/eslint-config-js/eslint.config.js` to keep this published config self-contained. */
15
- const jsConfig = [
16
- // Note: don't merge the below two objects!
17
- {
18
- files: ['{,prisma/**/,src/**/,test/**/,scripts/**/}*.{cjs,js,mjs}'],
19
- },
20
- {
21
- ignores: [
22
- // Directories
23
- '**/.venv/**',
24
- '**/.yarn/**',
25
- '**/3rd-party/**',
26
- '**/@types/**',
27
- '**/__generated__/**',
28
- '**/android/**',
29
- '**/bin/**',
30
- '**/build/**',
31
- '**/coverage/**',
32
- '**/dist/**',
33
- '**/ios/**',
34
- '**/no-format/**',
35
- '**/node_modules/**',
36
- '**/temp/**',
37
- '**/test-fixtures/**',
38
- '**/test/fixtures/**',
39
- // Files
40
- '**/*.d.ts',
41
- '**/*.min.*js',
42
- ],
43
- },
44
- // cf. https://github.com/eslint/eslint/blob/main/packages/js/src/configs/eslint-recommended.js
45
- js.configs.recommended,
46
- // cf. https://github.com/un-ts/eslint-plugin-import-x#configuration-new-eslintconfigjs
47
- // eslint-disable-next-line import-x/no-named-as-default-member
48
- eslintPluginImportX.flatConfigs.recommended,
49
- // cf. https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config
50
- eslintPluginUnicorn.configs.recommended,
51
- {
52
- plugins: {
53
- 'sort-class-members': eslintPluginSortClassMembers,
54
- 'sort-destructure-keys': eslintPluginSortDestructureKeys,
55
- },
56
- languageOptions: {
57
- ecmaVersion: 'latest',
58
- globals: {
59
- // for Web
60
- ...globals.browser,
61
- ...globals.serviceworker,
62
- // for Node.js
63
- ...globals.node,
64
- },
65
- },
66
- rules: {
67
- eqeqeq: 'warn',
68
- 'no-console': 'off', // Allow `console.log()`.
69
- 'no-unused-vars': ['warn', { ignoreRestSiblings: true }], // Allow unused vars in object destructuring.
70
- 'object-shorthand': 'error',
71
- 'one-var': ['error', 'never'], // We prefer one variable declaration per line.
72
- 'spaced-comment': 'error', // Enforce consistency of spacing after the start of a comment // or /*.
73
- 'import-x/newline-after-import': 'error',
74
- 'import-x/no-duplicates': 'error',
75
- /** Because we faced false positives (e.g. fast-glob), */
76
- 'import-x/no-named-as-default-member': 'warn',
77
- 'import-x/order': [
78
- 'error',
79
- {
80
- 'newlines-between': 'always',
81
- alphabetize: {
82
- order: 'asc',
83
- },
84
- },
85
- ],
86
- 'sort-destructure-keys/sort-destructure-keys': 'error',
87
- 'unicorn/filename-case': [
88
- 'error',
89
- {
90
- cases: {
91
- camelCase: true,
92
- pascalCase: true,
93
- },
94
- },
95
- ],
96
- 'unicorn/no-abusive-eslint-disable': 'off',
97
- 'unicorn/no-array-callback-reference': 'off',
98
- 'unicorn/no-array-reduce': 'warn',
99
- 'unicorn/no-null': 'warn',
100
- 'unicorn/no-process-exit': 'off',
101
- 'unicorn/no-useless-undefined': [
102
- 'error',
103
- {
104
- checkArguments: false,
105
- },
106
- ],
107
- 'unicorn/prefer-top-level-await': 'warn',
108
- 'unicorn/prevent-abbreviations': 'off',
109
- },
110
- },
111
- // cf. https://github.com/sweepline/eslint-plugin-unused-imports#usage
112
- {
113
- plugins: {
114
- 'unused-imports': eslintPluginUnusedImports,
115
- },
116
- rules: {
117
- 'no-unused-vars': 'off',
118
- 'unused-imports/no-unused-imports': 'error',
119
- 'unused-imports/no-unused-vars': [
120
- 'warn',
121
- {
122
- vars: 'all',
123
- varsIgnorePattern: '^_',
124
- args: 'after-used',
125
- argsIgnorePattern: '^_',
126
- },
127
- ],
128
- },
129
- },
130
- eslintConfigFlatGitignore(),
131
- // cf. https://github.com/prettier/eslint-config-prettier#installation
132
- eslintConfigPrettier,
133
- ];
134
-
135
- export default [
136
- ...jsConfig,
137
- /** React-specific rules copied from the previous `@willbooster/eslint-config-js-react` body. */
138
- {
139
- files: ['{,prisma/**/,src/**/,test/**/,scripts/**/}*.{cjs,js,jsx,mjs}'],
140
- languageOptions: {
141
- parserOptions: {
142
- ecmaFeatures: {
143
- jsx: true,
144
- },
145
- },
146
- },
147
- },
148
- // cf. https://eslint-react.xyz/docs/migrating-from-eslint-plugin-react
149
- eslintPluginReact.configs.recommended,
150
- // cf. https://www.npmjs.com/package/eslint-plugin-react-compiler
151
- eslintPluginReactCompiler.configs.recommended,
152
- {
153
- plugins: {
154
- perfectionist: eslintPluginPerfectionist,
155
- },
156
- settings: {
157
- 'react-x': {
158
- version: 'detect',
159
- },
160
- },
161
- rules: {
162
- '@eslint-react/dom-no-unknown-property': [
163
- 'error',
164
- {
165
- ignore: ['global', 'jsx'],
166
- },
167
- ],
168
- 'perfectionist/sort-jsx-props': [
169
- 'error',
170
- {
171
- customGroups: [
172
- {
173
- groupName: 'reserved',
174
- elementNamePattern: '^(children|dangerouslySetInnerHTML|key|ref)$',
175
- },
176
- {
177
- groupName: 'callback',
178
- elementNamePattern: '^on[A-Z]',
179
- },
180
- ],
181
- groups: ['reserved', 'shorthand-prop', 'unknown', 'callback'],
182
- },
183
- ],
184
- },
185
- },
186
- eslintConfigFlatGitignore(),
187
- // cf. https://github.com/prettier/eslint-config-prettier#installation
188
- eslintConfigPrettier,
189
- ];