Skip to content

Commit

Permalink
migrate to flat config, bump minimum nodejs version
Browse files Browse the repository at this point in the history
  • Loading branch information
saschanaz committed Oct 7, 2024
1 parent 1048a52 commit 34941c7
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 28 deletions.
25 changes: 0 additions & 25 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14, 16, 18]
node-version: [16, 18, 20, 22]

steps:
- uses: actions/checkout@v1
Expand Down
33 changes: 33 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import js from "@eslint/js";
import globals from "globals";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
import importPlugin from 'eslint-plugin-import';

export default [
js.configs.recommended,
eslintPluginPrettierRecommended,
importPlugin.flatConfigs.recommended,
{
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
globals: {
...globals.browser,
...globals.node,
...globals.mocha,
}
},
rules: {
"eol-last": "error",
"import/extensions": ["error", "always"],
'import/no-unresolved': 0, // https://github.com/import-js/eslint-plugin-import/issues/3082
"no-console": "error",
"no-constant-condition": ["error", { "checkLoops": false }],
"no-eval": "error",
"no-implied-eval": "error",
"no-trailing-spaces": "error",
"prefer-const": "error",
"semi": "error"
},
},
];
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"Timothy Gu <[email protected]>"
],
"engines": {
"node": ">= 14"
"node": ">= 16"
},
"license": "W3C",
"devDependencies": {
Expand Down

0 comments on commit 34941c7

Please sign in to comment.