eslint-config-seek 0.0.0-import-x-again-20250318050943 → 0.0.0-master-20251111232905

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/base.js +59 -3
  2. package/package.json +6 -9
package/base.js CHANGED
@@ -1,11 +1,12 @@
1
1
  const importX = require('eslint-plugin-import-x');
2
2
  const globals = require('globals');
3
3
  const jestPlugin = require('eslint-plugin-jest');
4
- const cypress = require('eslint-plugin-cypress/flat');
4
+ const cypress = require('eslint-plugin-cypress');
5
5
  const eslintConfigPrettier = require('eslint-config-prettier');
6
6
  const tseslint = require('typescript-eslint');
7
7
 
8
8
  const OFF = 0;
9
+ const WARN = 1;
9
10
  const ERROR = 2;
10
11
 
11
12
  const baseRules = {
@@ -13,7 +14,6 @@ const baseRules = {
13
14
  'no-console': ERROR,
14
15
  'no-unexpected-multiline': ERROR,
15
16
  'block-scoped-var': ERROR,
16
- curly: [ERROR, 'all'],
17
17
  'default-case': ERROR,
18
18
  'dot-notation': ERROR,
19
19
  eqeqeq: [ERROR, 'always', { null: 'ignore' }],
@@ -63,6 +63,29 @@ const baseRules = {
63
63
  'no-path-concat': ERROR,
64
64
  'no-process-exit': ERROR,
65
65
  'no-restricted-modules': ERROR,
66
+ 'no-restricted-syntax': [
67
+ ERROR,
68
+ {
69
+ selector: 'MethodDefinition[kind = "get"]',
70
+ message:
71
+ 'Custom getters can cause confusion, particularly if they throw errors. Remove the `get` syntax to specify a regular method instead.',
72
+ },
73
+ {
74
+ selector: 'MethodDefinition[kind = "set"]',
75
+ message:
76
+ 'Custom setters can cause confusion, particularly if they throw errors. Remove the `set` syntax to specify a regular method instead.',
77
+ },
78
+ {
79
+ selector: 'Property[kind = "get"]',
80
+ message:
81
+ 'Custom getters can cause confusion, particularly if they throw errors. Remove the `get` syntax to specify a regular property instead.',
82
+ },
83
+ {
84
+ selector: 'Property[kind = "set"]',
85
+ message:
86
+ 'Custom setters can cause confusion, particularly if they throw errors. Remove the `set` syntax to specify a regular property instead.',
87
+ },
88
+ ],
66
89
  'no-sync': ERROR,
67
90
  'linebreak-style': [ERROR, 'unix'],
68
91
  'new-cap': ERROR,
@@ -81,6 +104,10 @@ const baseRules = {
81
104
  'no-return-await': OFF,
82
105
  };
83
106
 
107
+ const eslintConfigPrettierOverrideRules = {
108
+ curly: [ERROR, 'all'],
109
+ };
110
+
84
111
  const { js: jsExtensions, ts: tsExtensions } = require('./extensions');
85
112
  const allExtensions = [...jsExtensions, ...tsExtensions];
86
113
 
@@ -94,7 +121,6 @@ const settings = {
94
121
  module.exports = [
95
122
  {
96
123
  plugins: {
97
- 'import-x': importX,
98
124
  jest: jestPlugin,
99
125
  cypress,
100
126
  '@typescript-eslint': tseslint.plugin,
@@ -125,6 +151,21 @@ module.exports = [
125
151
  rules: baseRules,
126
152
  },
127
153
  eslintConfigPrettier,
154
+ {
155
+ languageOptions: {
156
+ globals: {
157
+ ...globals.node,
158
+ },
159
+
160
+ parserOptions: {
161
+ requireConfigFile: false,
162
+ ecmaVersion: 'latest',
163
+ sourceType: 'module',
164
+ },
165
+ },
166
+ settings,
167
+ rules: eslintConfigPrettierOverrideRules,
168
+ },
128
169
  ...[...tseslint.configs.recommended, ...tseslint.configs.stylistic].map(
129
170
  ({ plugins, ...config }) => ({
130
171
  ...config,
@@ -156,6 +197,21 @@ module.exports = [
156
197
  '@typescript-eslint/ban-ts-comment': OFF,
157
198
  '@typescript-eslint/no-explicit-any': OFF,
158
199
  '@typescript-eslint/explicit-function-return-type': OFF,
200
+ '@typescript-eslint/naming-convention': [
201
+ // TODO - upgrade to ERROR in next major version
202
+ WARN,
203
+ {
204
+ selector: 'typeLike',
205
+ format: ['PascalCase'],
206
+ leadingUnderscore: 'allow',
207
+ },
208
+ // 'typeLike' includes enums
209
+ // This selector opts out of the rule for enums
210
+ {
211
+ selector: 'enum',
212
+ format: null,
213
+ },
214
+ ],
159
215
  '@typescript-eslint/no-empty-function': OFF,
160
216
  '@typescript-eslint/no-empty-interface': OFF,
161
217
  '@typescript-eslint/no-inferrable-types': [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-seek",
3
- "version": "0.0.0-import-x-again-20250318050943",
3
+ "version": "0.0.0-master-20251111232905",
4
4
  "description": "ESLint configuration used by SEEK",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -21,10 +21,10 @@
21
21
  "dependencies": {
22
22
  "typescript-eslint": "^8.6.0",
23
23
  "eslint-config-prettier": "^10.0.0",
24
- "eslint-import-resolver-typescript": "^3.6.3",
25
- "eslint-plugin-cypress": "^4.0.0",
26
- "eslint-plugin-import-x": "4.6.1",
27
- "eslint-plugin-jest": "^28.8.0",
24
+ "eslint-import-resolver-typescript": "^4.0.0",
25
+ "eslint-plugin-cypress": "^5.0.0",
26
+ "eslint-plugin-import-x": "^4.9.0",
27
+ "eslint-plugin-jest": "^29.0.0",
28
28
  "eslint-plugin-react": "^7.35.0",
29
29
  "eslint-plugin-react-hooks": "^5.0.0",
30
30
  "globals": "^16.0.0"
@@ -34,7 +34,7 @@
34
34
  "@changesets/get-github-info": "^0.6.0",
35
35
  "eslint": "^9.8.0",
36
36
  "prettier": "^3.3.3",
37
- "typescript": "~5.7.0"
37
+ "typescript": "~5.9.0"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "eslint": ">=9.9.1",
@@ -43,9 +43,6 @@
43
43
  "engines": {
44
44
  "node": ">=18.18.0"
45
45
  },
46
- "volta": {
47
- "node": "22.14.0"
48
- },
49
46
  "scripts": {
50
47
  "release": "changeset publish",
51
48
  "test": "eslint --config index.js . && eslint --config base.js .",