@wistia/oxlint-config 0.2.0 → 0.3.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/configs/javascript.ts +13 -0
- package/configs/node.ts +8 -0
- package/configs/playwright.ts +7 -0
- package/configs/react.ts +11 -0
- package/configs/storybook.ts +7 -0
- package/configs/styled-components.ts +7 -0
- package/configs/testing-library.ts +7 -0
- package/configs/typescript.ts +20 -0
- package/configs/vitest.ts +8 -0
- package/index.ts +27 -0
- package/package.json +15 -18
- package/rules/{base.jsonc → base.ts} +181 -184
- package/rules/{import.jsonc → import.ts} +32 -32
- package/rules/{node.jsonc → node.ts} +39 -39
- package/rules/{playwright.jsonc → playwright.ts} +54 -54
- package/rules/{promise.jsonc → promise.ts} +22 -22
- package/rules/{react-a11y.jsonc → react-a11y.ts} +50 -50
- package/rules/{react.jsonc → react.ts} +57 -57
- package/rules/{storybook.jsonc → storybook.ts} +22 -22
- package/rules/styled-components.ts +153 -0
- package/rules/{testing-library.jsonc → testing-library.ts} +50 -50
- package/rules/{typescript.jsonc → typescript.ts} +136 -136
- package/rules/{vitest.jsonc → vitest.ts} +89 -89
- package/types.ts +24 -0
- package/configs/javascript.jsonc +0 -4
- package/configs/node.jsonc +0 -4
- package/configs/playwright.jsonc +0 -4
- package/configs/react.jsonc +0 -4
- package/configs/storybook.jsonc +0 -4
- package/configs/styled-components.jsonc +0 -4
- package/configs/testing-library.jsonc +0 -4
- package/configs/typescript.jsonc +0 -4
- package/configs/vitest.jsonc +0 -4
- package/jsoncLoader.d.mts +0 -10
- package/jsoncLoader.mjs +0 -27
- package/rules/styled-components.jsonc +0 -153
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineConfig } from 'oxlint';
|
|
2
|
+
import { baseRules } from '../rules/base.ts';
|
|
3
|
+
import { importRules } from '../rules/import.ts';
|
|
4
|
+
import { promiseRules } from '../rules/promise.ts';
|
|
5
|
+
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
plugins: [...baseRules.plugins, ...importRules.plugins, ...promiseRules.plugins],
|
|
8
|
+
rules: {
|
|
9
|
+
...baseRules.rules,
|
|
10
|
+
...importRules.rules,
|
|
11
|
+
...promiseRules.rules,
|
|
12
|
+
},
|
|
13
|
+
});
|
package/configs/node.ts
ADDED
package/configs/react.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { defineConfig } from 'oxlint';
|
|
2
|
+
import { reactRules } from '../rules/react.ts';
|
|
3
|
+
import { reactA11yRules } from '../rules/react-a11y.ts';
|
|
4
|
+
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
plugins: [...reactRules.plugins, ...reactA11yRules.plugins],
|
|
7
|
+
rules: {
|
|
8
|
+
...reactRules.rules,
|
|
9
|
+
...reactA11yRules.rules,
|
|
10
|
+
},
|
|
11
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineConfig } from 'oxlint';
|
|
2
|
+
import { baseRules } from '../rules/base.ts';
|
|
3
|
+
import { importRules } from '../rules/import.ts';
|
|
4
|
+
import { promiseRules } from '../rules/promise.ts';
|
|
5
|
+
import { typescriptRules } from '../rules/typescript.ts';
|
|
6
|
+
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
plugins: [
|
|
9
|
+
...baseRules.plugins,
|
|
10
|
+
...importRules.plugins,
|
|
11
|
+
...promiseRules.plugins,
|
|
12
|
+
...typescriptRules.plugins,
|
|
13
|
+
],
|
|
14
|
+
rules: {
|
|
15
|
+
...baseRules.rules,
|
|
16
|
+
...importRules.rules,
|
|
17
|
+
...promiseRules.rules,
|
|
18
|
+
...typescriptRules.rules,
|
|
19
|
+
},
|
|
20
|
+
});
|
package/index.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Types
|
|
2
|
+
export type { RuleFile } from './types.ts';
|
|
3
|
+
|
|
4
|
+
// Rules
|
|
5
|
+
export { baseRules } from './rules/base.ts';
|
|
6
|
+
export { importRules } from './rules/import.ts';
|
|
7
|
+
export { promiseRules } from './rules/promise.ts';
|
|
8
|
+
export { typescriptRules } from './rules/typescript.ts';
|
|
9
|
+
export { reactRules } from './rules/react.ts';
|
|
10
|
+
export { reactA11yRules } from './rules/react-a11y.ts';
|
|
11
|
+
export { nodeRules } from './rules/node.ts';
|
|
12
|
+
export { vitestRules } from './rules/vitest.ts';
|
|
13
|
+
export { playwrightRules } from './rules/playwright.ts';
|
|
14
|
+
export { storybookRules } from './rules/storybook.ts';
|
|
15
|
+
export { styledComponentsRules } from './rules/styled-components.ts';
|
|
16
|
+
export { testingLibraryRules } from './rules/testing-library.ts';
|
|
17
|
+
|
|
18
|
+
// Configs
|
|
19
|
+
export { default as javascriptConfig } from './configs/javascript.ts';
|
|
20
|
+
export { default as typescriptConfig } from './configs/typescript.ts';
|
|
21
|
+
export { default as reactConfig } from './configs/react.ts';
|
|
22
|
+
export { default as nodeConfig } from './configs/node.ts';
|
|
23
|
+
export { default as vitestConfig } from './configs/vitest.ts';
|
|
24
|
+
export { default as playwrightConfig } from './configs/playwright.ts';
|
|
25
|
+
export { default as storybookConfig } from './configs/storybook.ts';
|
|
26
|
+
export { default as styledComponentsConfig } from './configs/styled-components.ts';
|
|
27
|
+
export { default as testingLibraryConfig } from './configs/testing-library.ts';
|
package/package.json
CHANGED
|
@@ -1,29 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wistia/oxlint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Wistia's Oxlint configurations",
|
|
5
5
|
"packageManager": "yarn@4.13.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
8
|
"configs",
|
|
9
9
|
"rules",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
10
|
+
"index.ts",
|
|
11
|
+
"types.ts"
|
|
12
12
|
],
|
|
13
13
|
"exports": {
|
|
14
14
|
"./package.json": "./package.json",
|
|
15
15
|
"./configs/*": "./configs/*",
|
|
16
16
|
"./rules/*": "./rules/*",
|
|
17
|
-
".": "./
|
|
18
|
-
"./javascript": "./configs/javascript.
|
|
19
|
-
"./typescript": "./configs/typescript.
|
|
20
|
-
"./react": "./configs/react.
|
|
21
|
-
"./node": "./configs/node.
|
|
22
|
-
"./vitest": "./configs/vitest.
|
|
23
|
-
"./jsoncLoader": {
|
|
24
|
-
"types": "./jsoncLoader.d.mts",
|
|
25
|
-
"default": "./jsoncLoader.mjs"
|
|
26
|
-
}
|
|
17
|
+
".": "./index.ts",
|
|
18
|
+
"./javascript": "./configs/javascript.ts",
|
|
19
|
+
"./typescript": "./configs/typescript.ts",
|
|
20
|
+
"./react": "./configs/react.ts",
|
|
21
|
+
"./node": "./configs/node.ts",
|
|
22
|
+
"./vitest": "./configs/vitest.ts"
|
|
27
23
|
},
|
|
28
24
|
"scripts": {
|
|
29
25
|
"changeset": "changeset",
|
|
@@ -31,8 +27,9 @@
|
|
|
31
27
|
"format:ci": "oxfmt --check .",
|
|
32
28
|
"outdated": "yarn upgrade-interactive",
|
|
33
29
|
"release": "changeset publish",
|
|
34
|
-
"test": "vitest run --exclude test/validate-configs.test.
|
|
35
|
-
"
|
|
30
|
+
"test": "vitest run --exclude test/validate-configs.test.mts",
|
|
31
|
+
"typecheck": "tsc --noEmit",
|
|
32
|
+
"validate": "vitest run test/validate-configs.test.mts"
|
|
36
33
|
},
|
|
37
34
|
"peerDependencies": {
|
|
38
35
|
"oxlint": ">= 1.0.0"
|
|
@@ -46,16 +43,16 @@
|
|
|
46
43
|
"eslint-plugin-storybook": "^10.3.4",
|
|
47
44
|
"eslint-plugin-styled-components": "^0.0.0",
|
|
48
45
|
"eslint-plugin-styled-components-a11y": "^2.2.1",
|
|
49
|
-
"eslint-plugin-testing-library": "^7.16.2"
|
|
50
|
-
"jsonc-parser": "^3.3.1"
|
|
46
|
+
"eslint-plugin-testing-library": "^7.16.2"
|
|
51
47
|
},
|
|
52
48
|
"devDependencies": {
|
|
53
49
|
"@changesets/changelog-github": "^0.6.0",
|
|
54
50
|
"@changesets/cli": "^2.30.0",
|
|
55
|
-
"eslint": "^10.
|
|
51
|
+
"eslint": "^10.2.0",
|
|
56
52
|
"oxfmt": "^0.43.0",
|
|
57
53
|
"oxlint": "^1.58.0",
|
|
58
54
|
"storybook": "^10.3.4",
|
|
55
|
+
"typescript": "^6.0.2",
|
|
59
56
|
"vitest": "^4.1.2"
|
|
60
57
|
},
|
|
61
58
|
"engines": {
|