Skip to content

Commit 34941c7

Browse files
committed
migrate to flat config, bump minimum nodejs version
1 parent 1048a52 commit 34941c7

File tree

5 files changed

+36
-28
lines changed

5 files changed

+36
-28
lines changed

.eslintrc.json

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

.github/workflows/nodejs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
node-version: [14, 16, 18]
10+
node-version: [16, 18, 20, 22]
1111

1212
steps:
1313
- uses: actions/checkout@v1

eslint.config.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import js from "@eslint/js";
2+
import globals from "globals";
3+
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
4+
import importPlugin from 'eslint-plugin-import';
5+
6+
export default [
7+
js.configs.recommended,
8+
eslintPluginPrettierRecommended,
9+
importPlugin.flatConfigs.recommended,
10+
{
11+
languageOptions: {
12+
ecmaVersion: "latest",
13+
sourceType: "module",
14+
globals: {
15+
...globals.browser,
16+
...globals.node,
17+
...globals.mocha,
18+
}
19+
},
20+
rules: {
21+
"eol-last": "error",
22+
"import/extensions": ["error", "always"],
23+
'import/no-unresolved': 0, // https://github.com/import-js/eslint-plugin-import/issues/3082
24+
"no-console": "error",
25+
"no-constant-condition": ["error", { "checkLoops": false }],
26+
"no-eval": "error",
27+
"no-implied-eval": "error",
28+
"no-trailing-spaces": "error",
29+
"prefer-const": "error",
30+
"semi": "error"
31+
},
32+
},
33+
];

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"Timothy Gu <[email protected]>"
1010
],
1111
"engines": {
12-
"node": ">= 14"
12+
"node": ">= 16"
1313
},
1414
"license": "W3C",
1515
"devDependencies": {

0 commit comments

Comments
 (0)