Skip to content

Commit bf5d8d5

Browse files
authored
upgrade eslint (#43)
* chore(eslint): migrate config to flat config and update deps Migrate ESLint configuration from the legacy `.eslintrc.js` to the new flat config format in `eslint.config.mjs`. Update ESLint and related dependencies to latest compatible versions. Adjust rules and plugin usage to match new config structure. This improves compatibility with ESLint 9+ and ensures up-to-date linting standards. * fix: resolve errors after upgrade to ESLint 9.0 Refactor settings and commands modules to use flat exports instead of namespaces. Update all imports to match the new export style. Remove the unused protocol.ts file. Improve type safety in requirements and server modules. This simplifies code structure and aligns with latest ESLint validation rules. * chore: enable prettier and fix formatting issues Fix files to include Prettier formatting. * chore: add markdown and YAML lint config files Add .markdownlint.yaml extending Prettier style for markdown linting. Add .yamllint.yaml extending default rules for YAML linting. * chore(deps): set min Node.js version to 18.x for builds - Update Node.js version in CI matrix to 18.x, 20.x, 22.x and set .node-version to 18 - Bump minimum Node.js engine to >=18.20.0 in package-lock.json - Upgrade major devDependencies: np, eslint, typescript, webpack, boxen, del, configstore, etc. - Remove deprecated and unused dependencies from lockfile - Update dependency trees for new versions and drop legacy subdeps - Improve compatibility with latest Node.js and ecosystem tools
1 parent 7ceaa34 commit bf5d8d5

17 files changed

Lines changed: 5757 additions & 5776 deletions

.eslintrc.js

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

.github/workflows/node.js.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@ on:
1010

1111
jobs:
1212
build:
13-
1413
runs-on: ubuntu-latest
1514

1615
strategy:
1716
matrix:
18-
node-version: [16.x, 18.x, 20.x]
17+
node-version: [18.x, 20.x, 22.x]
1918

2019
steps:
2120
- uses: actions/checkout@v3

.markdownlint.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
extends: 'markdownlint/style/prettier'

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18

.yamllint.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
extends: default

Readme.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ An [extension for coc.nvim](https://github.com/neoclide/coc.nvim/wiki/Using-coc-
1717

1818
1. Download and install a recent Java Development Kit (latest Java 8 is the minimum requirement).
1919
2. Install this extension by running this command in Vim:
20-
```
21-
:CocInstall coc-groovy
22-
```
20+
21+
```sh
22+
:CocInstall coc-groovy
23+
```
24+
2325
3. This extension is activated when you first open a Groovy file.
2426

2527
## Dependencies
@@ -29,8 +31,8 @@ An [extension for coc.nvim](https://github.com/neoclide/coc.nvim/wiki/Using-coc-
2931
Maven project support requires having the [Maven Wrapper][0] installed in your
3032
project or having [Maven][1] installed on your environment path.
3133

32-
* [Maven Wrapper][0]
33-
* [Installing Maven][1]
34+
- [Maven Wrapper][0]
35+
- [Installing Maven][1]
3436

3537
## Available commands
3638

eslint.config.mjs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import tseslint from '@typescript-eslint/eslint-plugin';
2+
import tsparser from '@typescript-eslint/parser';
3+
import prettierPlugin from 'eslint-plugin-prettier';
4+
import prettierConfig from 'eslint-config-prettier';
5+
6+
export default [
7+
{
8+
files: ['src/**/*.ts'],
9+
10+
languageOptions: {
11+
parser: tsparser,
12+
sourceType: 'module',
13+
},
14+
15+
plugins: {
16+
'@typescript-eslint': tseslint,
17+
prettier: prettierPlugin,
18+
},
19+
20+
rules: {
21+
...tseslint.configs.recommended.rules,
22+
...prettierConfig.rules,
23+
'@typescript-eslint/no-unused-vars': 'warn',
24+
'no-console': 'warn',
25+
semi: ['error', 'always'],
26+
'prettier/prettier': 'error',
27+
},
28+
},
29+
];

0 commit comments

Comments
 (0)