@scaleway/oxlint-config 0.1.17 → 0.2.0

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/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Scaleway's shareable configuration for [oxlint](https://oxc.rs/docs/guide/usage/linter.html).
4
4
 
5
+ > ⚠️ This package does not follow semver for now. Breaking can be introduced in minor/patch versions
6
+
5
7
  ## Installation
6
8
 
7
9
  ```bash
@@ -14,7 +16,7 @@ Create a `.oxlintrc.json` file in your project root:
14
16
 
15
17
  ```json
16
18
  {
17
- "extends": ["@scaleway/oxlint-config"]
19
+ "extends": ["./node_modules/@scaleway/oxlint-config/configs/index.json"]
18
20
  }
19
21
  ```
20
22
 
@@ -26,28 +28,10 @@ For React projects, extend the React configuration:
26
28
 
27
29
  ```json
28
30
  {
29
- "extends": ["@scaleway/oxlint-config", "@scaleway/oxlint-config/react"]
30
- }
31
- ```
32
-
33
- #### TypeScript
34
-
35
- For TypeScript projects, extend the TypeScript configuration:
36
-
37
- ```json
38
- {
39
- "extends": ["@scaleway/oxlint-config", "@scaleway/oxlint-config/typescript"]
40
- ```
41
-
42
- }
43
-
44
- #### Combined React and TypeScript
45
-
46
- For React projects using TypeScript, extend both configurations:
47
-
48
- ```json
49
- {
50
- "extends": ["@scaleway/oxlint-config", "@scaleway/oxlint-config/react", "@scaleway/oxlint-config/typescript"]
31
+ "extends": [
32
+ "./node_modules/@scaleway/oxlint-config/configs/index.json",
33
+ "./node_modules/@scaleway/oxlint-config/configs/react.json"
34
+ ]
51
35
  }
52
36
  ```
53
37
 
@@ -55,7 +39,6 @@ For React projects using TypeScript, extend both configurations:
55
39
 
56
40
  1. **Base rules** (`@scaleway/oxlint-config`): Core rules for all JavaScript/TypeScript projects
57
41
  2. **React rules** (`@scaleway/oxlint-config/react`): React-specific rules
58
- 3. **TypeScript rules** (`@scaleway/oxlint-config/typescript`): TypeScript-specific rules
59
42
 
60
43
  ## License
61
44
 
@@ -1,15 +1,6 @@
1
1
  {
2
2
  "$schema": "../node_modules/oxlint/configuration_schema.json",
3
- "categories": {
4
- "correctness": "deny",
5
- "nursery": "off",
6
- "pedantic": "deny",
7
- "perf": "deny",
8
- "restriction": "deny",
9
- "style": "deny",
10
- "suspicious": "deny"
11
- },
12
- "plugins": ["import", "node", "oxc", "unicorn"],
3
+ "plugins": ["typescript", "eslint", "import", "node", "oxc", "unicorn"],
13
4
  "rules": {
14
5
  "capitalized-comments": "off",
15
6
 
@@ -172,6 +163,49 @@
172
163
  "unicorn/no-null": "off",
173
164
  "unicorn/no-useless-undefined": "off",
174
165
  "unicorn/prefer-object-from-entries": "off",
175
- "unicorn/prefer-string-replace-all": "off"
166
+ "unicorn/prefer-string-replace-all": "off",
167
+ "unicorn/no-typeof-undefined": "error",
168
+ "unicorn/number-literal-case": "error",
169
+
170
+ // Typescript
171
+ "typescript/adjacent-overload-signatures": "error",
172
+ "typescript/array-type": "error",
173
+ "typescript/ban-ts-comment": "error",
174
+ "typescript/ban-tslint-comment": "off",
175
+ "typescript/ban-types": "error",
176
+ "typescript/consistent-indexed-object-style": "off",
177
+ "typescript/consistent-type-definitions": ["error", "type"],
178
+ "typescript/consistent-type-exports": "error",
179
+ "typescript/explicit-function-return-type": "off",
180
+ "typescript/explicit-module-boundary-types": "off",
181
+ "typescript/no-duplicate-enum-values": "error",
182
+ "typescript/no-empty-interface": "error",
183
+ "typescript/no-explicit-any": "error",
184
+ "typescript/no-extra-non-null-assertion": "error",
185
+ "typescript/no-magic-numbers": "off",
186
+ "typescript/no-misused-new": "error",
187
+ "typescript/no-namespace": "error",
188
+ "typescript/no-non-null-asserted-optional-chain": "error",
189
+ "typescript/no-non-null-assertion": "off",
190
+ "typescript/no-this-alias": "error",
191
+ "typescript/no-unnecessary-type-arguments": "off",
192
+ "typescript/no-unnecessary-type-constraint": "error",
193
+ "typescript/no-unnecessary-type-conversion": "off",
194
+ "typescript/no-unsafe-declaration-merging": "error",
195
+ "typescript/no-unsafe-member-access": "error",
196
+ "typescript/no-var-requires": "error",
197
+ "typescript/prefer-as-const": "error",
198
+ "typescript/prefer-enum-initializers": "off",
199
+ "typescript/prefer-readonly-parameter-types": "off",
200
+ "typescript/prefer-for-of": "error",
201
+ "typescript/prefer-function-type": "off",
202
+ "typescript/prefer-literal-enum-member": "off",
203
+ "typescript/prefer-regexp-exec": "off",
204
+ "typescript/prefer-ts-expect-error": "off",
205
+ "typescript/triple-slash-reference": "error",
206
+ "typescript/no-unsafe-return": "error",
207
+ "typescript/no-unsafe-assignment": "error",
208
+ "typescript/no-unsafe-argument": "error",
209
+ "typescript/no-inferrable-types": "error"
176
210
  }
177
211
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/oxlint-config",
3
- "version": "0.1.17",
3
+ "version": "0.2.0",
4
4
  "description": "Scaleway's shareable configuration for oxlint",
5
5
  "keywords": [
6
6
  "config",
@@ -21,14 +21,13 @@
21
21
  "exports": {
22
22
  ".": "./configs/index.json",
23
23
  "./react": "./configs/react.json",
24
- "./typescript": "./configs/typescript.json",
25
24
  "./vitest": "./configs/vitest.json"
26
25
  },
27
26
  "publishConfig": {
28
27
  "access": "public"
29
28
  },
30
29
  "devDependencies": {
31
- "oxlint": "1.63.0"
30
+ "oxlint": "1.68.0"
32
31
  },
33
32
  "peerDependencies": {
34
33
  "oxlint": ">=1.55.0"
@@ -1,42 +0,0 @@
1
- {
2
- "$schema": "../node_modules/oxlint/configuration_schema.json",
3
- "extends": ["./index.json"],
4
- "plugins": ["typescript"],
5
- "rules": {
6
- "typescript/adjacent-overload-signatures": "error",
7
- "typescript/array-type": "error",
8
- "typescript/ban-ts-comment": "error",
9
- "typescript/ban-tslint-comment": "off",
10
- "typescript/ban-types": "error",
11
- "typescript/consistent-indexed-object-style": "off",
12
- "typescript/consistent-type-definitions": ["error", "type"],
13
- "typescript/consistent-type-exports": "error",
14
- "typescript/explicit-function-return-type": "off",
15
- "typescript/explicit-module-boundary-types": "off",
16
- "typescript/no-duplicate-enum-values": "error",
17
- "typescript/no-empty-interface": "error",
18
- "typescript/no-explicit-any": "error",
19
- "typescript/no-extra-non-null-assertion": "error",
20
- "typescript/no-magic-numbers": "off",
21
- "typescript/no-misused-new": "error",
22
- "typescript/no-namespace": "error",
23
- "typescript/no-non-null-asserted-optional-chain": "error",
24
- "typescript/no-non-null-assertion": "off",
25
- "typescript/no-this-alias": "error",
26
- "typescript/no-unnecessary-type-arguments": "off",
27
- "typescript/no-unnecessary-type-constraint": "error",
28
- "typescript/no-unnecessary-type-conversion": "off",
29
- "typescript/no-unsafe-declaration-merging": "error",
30
- "typescript/no-unsafe-member-access": "error",
31
- "typescript/no-var-requires": "error",
32
- "typescript/prefer-as-const": "error",
33
- "typescript/prefer-enum-initializers": "off",
34
- "typescript/prefer-readonly-parameter-types": "off",
35
- "typescript/prefer-for-of": "error",
36
- "typescript/prefer-function-type": "off",
37
- "typescript/prefer-literal-enum-member": "off",
38
- "typescript/prefer-regexp-exec": "off",
39
- "typescript/prefer-ts-expect-error": "off",
40
- "typescript/triple-slash-reference": "error"
41
- }
42
- }