@gooddata/oxlint-config 11.19.0-alpha.10

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/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright (c) 2022 GoodData Corporation
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,95 @@
1
+ # @gooddata/oxlint-config
2
+
3
+ OxLint configuration for the GoodData.UI monorepo, designed to work alongside `@gooddata/eslint-config`.
4
+
5
+ ## Purpose
6
+
7
+ This package provides oxlint configuration that complements the `oxlint-*` variants from `@gooddata/eslint-config`. Together, they provide complete linting coverage with improved performance by offloading rules to the faster Rust-based oxlint.
8
+
9
+ ## How It Works
10
+
11
+ The GoodData linting setup is split between two tools:
12
+
13
+ | Tool | Package | Handles |
14
+ | ------ | ---------------------------------- | -------------------------------------------- |
15
+ | ESLint | `@gooddata/eslint-config/oxlint-*` | Rules not supported by oxlint |
16
+ | OxLint | `@gooddata/oxlint-config` | Rules supported by oxlint (faster execution) |
17
+
18
+ **Why split?**
19
+
20
+ - **Performance**: OxLint is significantly faster than ESLint for the rules it supports
21
+ - **Coverage**: ESLint still handles plugins and rules that oxlint doesn't support yet
22
+ - **Consistency**: The combined output matches the standard `@gooddata/eslint-config` variants
23
+
24
+ ## Usage
25
+
26
+ ### 1. Configure ESLint
27
+
28
+ Use an `oxlint-*` variant from `@gooddata/eslint-config`:
29
+
30
+ ```typescript
31
+ // eslint.config.ts
32
+ // (C) 2025 GoodData Corporation
33
+
34
+ import config from "@gooddata/eslint-config/oxlint-esm-react-vitest";
35
+
36
+ export default config;
37
+ ```
38
+
39
+ ### 2. Configure OxLint
40
+
41
+ Create an `.oxlintrc.json` that extends this package:
42
+
43
+ ```json
44
+ {
45
+ "$schema": "./node_modules/oxlint/configuration_schema.json",
46
+ "extends": ["./node_modules/@gooddata/oxlint-config/dist/base.json"]
47
+ }
48
+ ```
49
+
50
+ ### 3. Run Both Linters
51
+
52
+ Run both linters in your CI/development workflow:
53
+
54
+ ```bash
55
+ # Run oxlint first (faster, catches bulk of issues)
56
+ oxlint .
57
+
58
+ # Run eslint for remaining rules
59
+ eslint .
60
+ ```
61
+
62
+ ## Compatibility
63
+
64
+ This package is designed to work with all `oxlint-*` variants from `@gooddata/eslint-config`. See `@gooddata/eslint-config` for the full list of available variants.
65
+
66
+ ## Migration from Standard ESLint
67
+
68
+ To migrate from standard `@gooddata/eslint-config` to the oxlint-enhanced setup:
69
+
70
+ 1. Install both packages:
71
+
72
+ ```bash
73
+ rush add -p @gooddata/oxlint-config --dev
74
+ ```
75
+
76
+ 2. Update your `eslint.config.ts` to use an `oxlint-*` variant:
77
+
78
+ ```typescript
79
+ // Before
80
+ import config from "@gooddata/eslint-config/esm-react-vitest";
81
+
82
+ // After
83
+ import config from "@gooddata/eslint-config/oxlint-esm-react-vitest";
84
+ ```
85
+
86
+ 3. Add `.oxlintrc.json` extending this package:
87
+
88
+ ```json
89
+ {
90
+ "$schema": "./node_modules/oxlint/configuration_schema.json",
91
+ "extends": ["./node_modules/@gooddata/oxlint-config/dist/base.json"]
92
+ }
93
+ ```
94
+
95
+ 4. Update your lint scripts to run both linters
package/dist/base.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "categories": {
3
+ "correctness": "error"
4
+ },
5
+ "plugins": [
6
+ "oxc"
7
+ ],
8
+ "jsPlugins": [],
9
+ "rules": {
10
+ "oxc/only-used-in-recursion": "off",
11
+ "no-useless-escape": "off",
12
+ "no-unsafe-optional-chaining": "off"
13
+ },
14
+ "overrides": [],
15
+ "settings": {},
16
+ "env": {},
17
+ "ignorePatterns": []
18
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "categories": {
3
+ "correctness": "error"
4
+ },
5
+ "plugins": [
6
+ "oxc"
7
+ ],
8
+ "jsPlugins": [
9
+ {
10
+ "name": "chai-friendly",
11
+ "specifier": "eslint-plugin-chai-friendly"
12
+ }
13
+ ],
14
+ "rules": {
15
+ "oxc/only-used-in-recursion": "off",
16
+ "no-useless-escape": "off",
17
+ "no-unsafe-optional-chaining": "off",
18
+ "no-unused-expressions": "off",
19
+ "chai-friendly/no-unused-expressions": "error"
20
+ },
21
+ "overrides": [],
22
+ "settings": {},
23
+ "env": {},
24
+ "ignorePatterns": []
25
+ }
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "@gooddata/oxlint-config",
3
+ "version": "11.19.0-alpha.10",
4
+ "license": "MIT",
5
+ "author": "GoodData",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/gooddata/gooddata-ui-sdk.git",
9
+ "directory": "tools/oxlint-config"
10
+ },
11
+ "files": [
12
+ "dist/*.json",
13
+ "dist/*.js",
14
+ "dist/*.d.ts",
15
+ "dist/*.cjs",
16
+ "*.md",
17
+ "LICENSE"
18
+ ],
19
+ "type": "module",
20
+ "sideEffects": false,
21
+ "exports": {
22
+ ".": "./dist/base.json",
23
+ "./cypress": "./dist/cypress.json"
24
+ },
25
+ "devDependencies": {
26
+ "@eslint/js": "9.28.0",
27
+ "@types/node": "^22.13.0",
28
+ "@typescript-eslint/eslint-plugin": "8.52.0",
29
+ "@typescript-eslint/parser": "8.52.0",
30
+ "@typescript/native-preview": "7.0.0-dev.20260202.1",
31
+ "eslint": "^9.39.2",
32
+ "eslint-import-resolver-typescript": "4.4.4",
33
+ "eslint-plugin-chai-friendly": "1.1.0",
34
+ "eslint-plugin-headers": "1.3.3",
35
+ "eslint-plugin-import-esm": "1.2.1",
36
+ "eslint-plugin-import-x": "4.16.1",
37
+ "eslint-plugin-no-barrel-files": "1.2.2",
38
+ "eslint-plugin-sonarjs": "3.0.6",
39
+ "globals": "17.2.0",
40
+ "jiti": "2.6.1",
41
+ "oxfmt": "0.27.0",
42
+ "oxlint": "^1.43.0",
43
+ "typescript": "5.9.3",
44
+ "vite-node": "^5.2.0",
45
+ "@gooddata/lint-config": "11.19.0-alpha.10",
46
+ "@gooddata/eslint-config": "11.19.0-alpha.10"
47
+ },
48
+ "peerDependencies": {
49
+ "oxlint": "^1.43.0"
50
+ },
51
+ "scripts": {
52
+ "_phase:build": "npm run build",
53
+ "_phase:validate": "npm run validate",
54
+ "build": "rm -rf dist && mkdir dist && vite-node scripts/build.ts && tsgo",
55
+ "clean": "../../common/scripts/clean-command-state.sh && rm -rf ci dist esm coverage *.log tsconfig.tsbuildinfo",
56
+ "eslint": "eslint .",
57
+ "eslint-fix": "eslint . --fix",
58
+ "lint": "npm run oxlint && npm run eslint",
59
+ "lint-fix": "npm run oxlint-fix && npm run eslint-fix",
60
+ "oxfmt-check": "oxfmt --check .",
61
+ "oxfmt-write": "oxfmt .",
62
+ "oxlint": "oxlint .",
63
+ "oxlint-fix": "oxlint . --fix",
64
+ "update-package": "vite-node scripts/updatePackage.ts",
65
+ "validate": "npm run lint && npm run oxfmt-check"
66
+ }
67
+ }