Skip to content

Commit 4d846d1

Browse files
authored
feat(deps): Support ESLint 9 (#50)
* feat(deps): Support ESLint 9 * update README * update README * update README * chore: add prettier * Update src/textlint-rule-eslint.ts+2 * Update src/textlint-rule-eslint.ts
1 parent 201d1a0 commit 4d846d1

File tree

8 files changed

+1933
-1582
lines changed

8 files changed

+1933
-1582
lines changed

.githooks/pre-commit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
npx --no-install lint-staged

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
runs-on: ubuntu-latest
77
strategy:
88
matrix:
9-
node-version: [ 14, 16 ]
9+
node-version: [ 20, 22 ]
1010
steps:
1111
- name: checkout
1212
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
@@ -15,6 +15,6 @@ jobs:
1515
with:
1616
node-version: ${{ matrix.node-version }}
1717
- name: Install
18-
run: yarn install
18+
run: npm ci
1919
- name: Test
20-
run: yarn test
20+
run: npm test

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ To ignore ESLint parsing errors that cannot be ignored from the config file, you
3737
{
3838
"rules": {
3939
"eslint": {
40-
"configFile": "path/to/.eslintrc"
40+
"configFile": "path/to/.eslintrc",
4141
"ignoreParsingErrors": true
4242
}
4343
}
@@ -92,8 +92,8 @@ textlint --rule eslint README.md
9292
"eslint": {
9393
// Required: path to .eslintrc file
9494
"configFile": "path/to/.eslintrc",
95-
// recognize lang of CodeBlock
96-
"langs": ["js", "javascript", "node", "jsx"]
95+
// recognize lang of CodeBlock as JavaScript
96+
"langs": ["js", "javascript", "node", "jsx"],
9797
// Ignore ESLint parsing errors
9898
"ignoreParsingErrors": true
9999
}
@@ -113,11 +113,14 @@ See [https://github.com/textlint/textlint/#fixable](https://github.com/textlint/
113113

114114
See [Releases page](https://github.com/textlint-rule/textlint-rule-eslint/releases).
115115

116+
- `textlint-rule-eslint@5`: Support ESLint 9
117+
- `textlint-rule-eslint@4`: Support ESLint 8
118+
116119
## Running tests
117120

118121
Install devDependencies and Run `npm test`:
119122

120-
npm i -d && npm test
123+
npm ci && npm test
121124

122125
## Contributing
123126

0 commit comments

Comments
 (0)