Skip to content

Commit 54db6bd

Browse files
committed
Fixed linting in CI; link to self instead of writing to node_modules; merge fixture eslint config into root overrides; cover more files with linting
1 parent 7be4a1b commit 54db6bd

File tree

13 files changed

+136
-83
lines changed

13 files changed

+136
-83
lines changed

.eslintignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
dist
22
node_modules
3-
scripts/docs.ts
43
jest.config.js
5-
# test/fixture/invalid

.eslintrc.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,20 @@
4747
"node": false,
4848
"worker": true
4949
}
50+
},
51+
{
52+
"files": "test/fixture/**/*.{js,jsx,ts,tsx}",
53+
"env": {
54+
"node": false,
55+
"browser": true
56+
},
57+
"plugins": ["solid"],
58+
"extends": "plugin:solid/recommended",
59+
"rules": {
60+
"@typescript-eslint/ban-ts-comment": 0,
61+
"@typescript-eslint/no-empty-function": 0
62+
}
5063
}
51-
]
64+
],
65+
"reportUnusedDisableDirectives": true
5266
}

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"prepare": "husky install",
1515
"prepublishOnly": "pnpm build && pnpm lint && prettier --check src && pnpm test:all",
1616
"build": "tsc -p tsconfig.build.json && pnpm run docs",
17-
"lint": "eslint .",
17+
"lint": "eslint --ignore-pattern test/fixture/invalid .",
1818
"docs": "PARSER=none ts-node --transpile-only scripts/docs.ts",
1919
"test": "jest --runInBand",
2020
"test:ts": "PARSER=ts pnpm test",
@@ -48,11 +48,13 @@
4848
"@types/jest": "^27.5.2",
4949
"@types/markdown-magic": "^1.0.1",
5050
"@types/node": "^16.11.45",
51-
"@typescript-eslint/eslint-plugin": "^5.30.7",
51+
"@types/prettier": "^2.7.1",
52+
"@typescript-eslint/eslint-plugin": "^5.39.0",
5253
"@typescript-eslint/parser": "^5.30.7",
5354
"eslint": "^8.20.0",
5455
"eslint-plugin-eslint-plugin": "^4.4.1",
5556
"eslint-plugin-import": "^2.26.0",
57+
"eslint-plugin-solid": "link:.",
5658
"eslint-v6": "npm:eslint@^6.8.0",
5759
"eslint-v7": "npm:eslint@^7.32.0",
5860
"execa": "^5.1.1",
@@ -73,8 +75,8 @@
7375
"eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
7476
},
7577
"lint-staged": {
76-
"*!(test).{js,ts,tsx}": [
77-
"eslint --fix",
78+
"*!(test).{js,jsx,ts,tsx}": [
79+
"eslint --ignore-pattern test/fixture/invalid --fix",
7880
"prettier --write"
7981
]
8082
},

pnpm-lock.yaml

Lines changed: 95 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/docs.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-var-requires */
12
import path from "path";
23
import fs from "fs-extra";
34
import markdownMagic from "markdown-magic";
@@ -181,7 +182,7 @@ async function run() {
181182
transforms: {
182183
HEADER: () => buildHeader(docFile),
183184
OPTIONS: () => buildOptions(docFile),
184-
CASES: (content) => buildCases(content, docFile),
185+
CASES: (content: string) => buildCases(content, docFile),
185186
},
186187
});
187188
}

0 commit comments

Comments
 (0)