Skip to content

Commit 555de4b

Browse files
Updating dependencies
* Changes to eslint require some rewriting of config. * Included @types/write-good * Typo fix in configuration setup PR merged (PR22)
1 parent 9f0f5eb commit 555de4b

5 files changed

Lines changed: 56 additions & 37 deletions

File tree

.eslintrc.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,5 @@ Check out the [Extending Visual Studio Code](https://code.visualstudio.com/Docs/
4040
## Thank you to contributors
4141

4242
Thank you to [James Ruskin](https://github.com/JPRuskin) for enabling settings. [PR4](https://github.com/TravisTheTechie/vscode-write-good/pull/4)
43+
44+
Thank you to [Freed-Wu](https://github.com/Freed-Wu) for typo fixes in configuration. [PR22](https://github.com/TravisTheTechie/vscode-write-good/pull/22)

eslint.config.mjs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import typescriptEslint from "@typescript-eslint/eslint-plugin";
2+
import tsParser from "@typescript-eslint/parser";
3+
import path from "node:path";
4+
import { fileURLToPath } from "node:url";
5+
import js from "@eslint/js";
6+
import { FlatCompat } from "@eslint/eslintrc";
7+
8+
const __filename = fileURLToPath(import.meta.url);
9+
const __dirname = path.dirname(__filename);
10+
const compat = new FlatCompat({
11+
baseDirectory: __dirname,
12+
recommendedConfig: js.configs.recommended,
13+
allConfig: js.configs.all
14+
});
15+
16+
export default [
17+
...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"),
18+
{
19+
plugins: {
20+
"@typescript-eslint": typescriptEslint,
21+
},
22+
23+
languageOptions: {
24+
parser: tsParser,
25+
},
26+
27+
rules: {
28+
semi: [2, "always"],
29+
"@typescript-eslint/no-unused-vars": 0,
30+
"@typescript-eslint/no-explicit-any": 0,
31+
"@typescript-eslint/explicit-module-boundary-types": 0,
32+
"@typescript-eslint/no-non-null-assertion": 0,
33+
},
34+
},
35+
];

package.json

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
"name": "write-good-linter",
33
"displayName": "Write Good Linter",
44
"description": "Applies the Write Good Linter to your Markdown, so you can write more good.",
5-
"version": "0.1.5",
5+
"version": "0.1.6",
66
"publisher": "travisthetechie",
77
"engines": {
8-
"vscode": "^1.89.0"
8+
"vscode": "^1.95.0"
99
},
1010
"categories": [
1111
"Linters"
@@ -29,9 +29,9 @@
2929
"scope": "resource"
3030
},
3131
"write-good.only-lint-on-save": {
32-
"type": [
33-
"null",
34-
"boolean"
32+
"type": [
33+
"null",
34+
"boolean"
3535
],
3636
"default": false,
3737
"markdownDescription": "Disables linting during editing for large files. A save triggers linting.",
@@ -65,20 +65,24 @@
6565
}
6666
},
6767
"scripts": {
68-
"vscode:prepublish": "npm run compile",
69-
"compile": "tsc -p ./",
70-
"lint": "eslint \"src/**/*.ts\"",
71-
"watch": "tsc -watch -p ./"
68+
"vscode:prepublish": "npm run compile",
69+
"compile": "tsc -p ./",
70+
"lint": "eslint \"src/**/*.ts\"",
71+
"watch": "tsc -watch -p ./"
7272
},
7373
"devDependencies": {
74-
"@typescript-eslint/eslint-plugin": "^6.7.0",
75-
"@typescript-eslint/parser": "^6.7.0",
76-
"eslint": "^8.56.0",
77-
"@types/node": "^20.12.12",
78-
"@types/vscode": "1.89.0",
79-
"typescript": "^5.4.5"
74+
"@eslint/eslintrc": "^3.2.0",
75+
"@eslint/js": "^9.15.0",
76+
"@types/node": "^22.9.3",
77+
"@types/vscode": "1.95.0",
78+
"@types/write-good": "1.0.3",
79+
"@typescript-eslint/eslint-plugin": "^8.15.0",
80+
"@typescript-eslint/parser": "^8.15.0",
81+
"eslint": "^9.15.0",
82+
"typescript": "^5.7.2"
8083
},
8184
"dependencies": {
85+
"@types/write-good": "^1.0.3",
8286
"write-good": "^1.0.8"
8387
},
8488
"license": "MIT",

src/extension.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
import { workspace, ExtensionContext, TextDocument, languages, Uri,
42
Diagnostic, DiagnosticCollection } from 'vscode';
53
import { lintText } from './linter';

0 commit comments

Comments
 (0)