@willbooster/eslint-config-js 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 +16 -42
  2. package/eslint.config.js +0 -129
package/package.json CHANGED
@@ -1,68 +1,42 @@
1
1
  {
2
2
  "name": "@willbooster/eslint-config-js",
3
- "version": "12.0.1",
3
+ "version": "12.0.2",
4
4
  "description": "ESLint flat config for JavaScript 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"
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/js": "10.0.1",
35
30
  "@tsconfig/node-lts": "24.0.0",
36
31
  "@tsconfig/node-ts": "23.6.4",
37
- "@willbooster/prettier-config": "10.4.0",
38
- "eslint": "10.2.0",
39
- "eslint-config-flat-gitignore": "2.3.0",
40
- "eslint-config-prettier": "10.1.8",
41
- "eslint-plugin-import-x": "4.16.2",
42
- "eslint-plugin-sort-class-members": "1.21.0",
43
- "eslint-plugin-sort-destructure-keys": "3.0.0",
44
- "eslint-plugin-unicorn": "64.0.0",
45
- "eslint-plugin-unused-imports": "4.4.1",
46
- "globals": "17.4.0",
47
- "micromatch": "4.0.8",
48
- "oxfmt": "0.45.0",
49
- "oxlint": "1.60.0",
50
- "oxlint-tsgolint": "0.21.0",
51
- "prettier": "3.8.1",
52
- "prettier-plugin-java": "2.8.1",
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",
53
37
  "sort-package-json": "3.6.1"
54
38
  },
55
- "peerDependencies": {
56
- "@eslint/js": ">=10",
57
- "eslint": ">=10",
58
- "eslint-config-flat-gitignore": ">=2.1",
59
- "eslint-config-prettier": ">=10",
60
- "eslint-plugin-import-x": ">=4",
61
- "eslint-plugin-sort-class-members": ">=1.21",
62
- "eslint-plugin-sort-destructure-keys": ">=2",
63
- "eslint-plugin-unicorn": ">=57",
64
- "eslint-plugin-unused-imports": ">=4",
65
- "globals": ">=16"
66
- },
67
- "prettier": "@willbooster/prettier-config"
39
+ "publishConfig": {
40
+ "access": "public"
41
+ }
68
42
  }
package/eslint.config.js DELETED
@@ -1,129 +0,0 @@
1
- import js from '@eslint/js';
2
- import eslintConfigFlatGitignore from 'eslint-config-flat-gitignore';
3
- import eslintConfigPrettier from 'eslint-config-prettier';
4
- import eslintPluginImportX from 'eslint-plugin-import-x';
5
- import eslintPluginSortClassMembers from 'eslint-plugin-sort-class-members';
6
- import eslintPluginSortDestructureKeys from 'eslint-plugin-sort-destructure-keys';
7
- import eslintPluginUnicorn from 'eslint-plugin-unicorn';
8
- import eslintPluginUnusedImports from 'eslint-plugin-unused-imports';
9
- import globals from 'globals';
10
-
11
- export default [
12
- // Note: don't merge the below two objects!
13
- {
14
- files: ['{,prisma/**/,src/**/,test/**/,scripts/**/}*.{cjs,js,mjs}'],
15
- },
16
- {
17
- ignores: [
18
- // Directories
19
- '**/.venv/**',
20
- '**/.yarn/**',
21
- '**/3rd-party/**',
22
- '**/@types/**',
23
- '**/__generated__/**',
24
- '**/android/**',
25
- '**/bin/**',
26
- '**/build/**',
27
- '**/coverage/**',
28
- '**/dist/**',
29
- '**/ios/**',
30
- '**/no-format/**',
31
- '**/node_modules/**',
32
- '**/temp/**',
33
- '**/test-fixtures/**',
34
- '**/test/fixtures/**',
35
- // Files
36
- '**/*.d.ts',
37
- '**/*.min.*js',
38
- ],
39
- },
40
- // cf. https://github.com/eslint/eslint/blob/main/packages/js/src/configs/eslint-recommended.js
41
- js.configs.recommended,
42
- // cf. https://github.com/un-ts/eslint-plugin-import-x#configuration-new-eslintconfigjs
43
- // eslint-disable-next-line import-x/no-named-as-default-member
44
- eslintPluginImportX.flatConfigs.recommended,
45
- // cf. https://github.com/sindresorhus/eslint-plugin-unicorn#recommended-config
46
- eslintPluginUnicorn.configs.recommended,
47
- {
48
- plugins: {
49
- 'sort-class-members': eslintPluginSortClassMembers,
50
- 'sort-destructure-keys': eslintPluginSortDestructureKeys,
51
- },
52
- languageOptions: {
53
- ecmaVersion: 'latest',
54
- globals: {
55
- // for Web
56
- ...globals.browser,
57
- ...globals.serviceworker,
58
- // for Node.js
59
- ...globals.node,
60
- },
61
- },
62
- rules: {
63
- eqeqeq: 'warn',
64
- 'no-console': 'off', // Allow `console.log()`.
65
- 'no-unused-vars': ['warn', { ignoreRestSiblings: true }], // Allow unused vars in object destructuring.
66
- 'object-shorthand': 'error',
67
- 'one-var': ['error', 'never'], // We prefer one variable declaration per line.
68
- 'spaced-comment': 'error', // Enforce consistency of spacing after the start of a comment // or /*.
69
- 'import-x/newline-after-import': 'error',
70
- 'import-x/no-duplicates': 'error',
71
- /** Because we faced false positives (e.g. fast-glob), */
72
- 'import-x/no-named-as-default-member': 'warn',
73
- 'import-x/order': [
74
- 'error',
75
- {
76
- 'newlines-between': 'always',
77
- alphabetize: {
78
- order: 'asc',
79
- },
80
- },
81
- ],
82
- 'sort-destructure-keys/sort-destructure-keys': 'error',
83
- 'unicorn/filename-case': [
84
- 'error',
85
- {
86
- cases: {
87
- camelCase: true,
88
- pascalCase: true,
89
- },
90
- },
91
- ],
92
- 'unicorn/no-abusive-eslint-disable': 'off',
93
- 'unicorn/no-array-callback-reference': 'off',
94
- 'unicorn/no-array-reduce': 'warn',
95
- 'unicorn/no-null': 'warn',
96
- 'unicorn/no-process-exit': 'off',
97
- 'unicorn/no-useless-undefined': [
98
- 'error',
99
- {
100
- checkArguments: false,
101
- },
102
- ],
103
- 'unicorn/prefer-top-level-await': 'warn',
104
- 'unicorn/prevent-abbreviations': 'off',
105
- },
106
- },
107
- // cf. https://github.com/sweepline/eslint-plugin-unused-imports#usage
108
- {
109
- plugins: {
110
- 'unused-imports': eslintPluginUnusedImports,
111
- },
112
- rules: {
113
- 'no-unused-vars': 'off',
114
- 'unused-imports/no-unused-imports': 'error',
115
- 'unused-imports/no-unused-vars': [
116
- 'warn',
117
- {
118
- vars: 'all',
119
- varsIgnorePattern: '^_',
120
- args: 'after-used',
121
- argsIgnorePattern: '^_',
122
- },
123
- ],
124
- },
125
- },
126
- eslintConfigFlatGitignore(),
127
- // cf. https://github.com/prettier/eslint-config-prettier#installation
128
- eslintConfigPrettier,
129
- ];