Skip to content

Commit

Permalink
Update dependency: eslint to 9.1.1, update to ESLint 9's "flat" confi…
Browse files Browse the repository at this point in the history
…guration file format.
  • Loading branch information
DavidAnson committed Apr 23, 2024
1 parent 55658e4 commit f9d4f3c
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 64 deletions.
62 changes: 0 additions & 62 deletions .eslintrc.json

This file was deleted.

1 change: 1 addition & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ webworker
.npmrc
.vscodeignore
CONTRIBUTING.md
eslint.config.mjs
extension.js
generate-config-schema.js
jsconfig.json
Expand Down
70 changes: 70 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/* eslint-disable n/no-unpublished-import */

import js from "@eslint/js";
import eslintPluginN from "eslint-plugin-n";
import eslintPluginUnicorn from "eslint-plugin-unicorn";

export default [
js.configs.all,
eslintPluginN.configs["flat/recommended"],
eslintPluginUnicorn.configs["flat/all"],
{
"languageOptions": {
"sourceType": "commonjs",
},
"linterOptions": {
"reportUnusedDisableDirectives": true
},
"rules": {
"array-bracket-spacing": [ "error", "always" ],
"dot-location": [ "error", "property" ],
"func-style": [ "error", "declaration" ],
"function-call-argument-newline": [ "error", "consistent" ],
"function-paren-newline": [ "error", "consistent" ],
"global-require": "off",
"indent": [ "error", "tab" ],
"linebreak-style": "off",
"max-classes-per-file": "off",
"max-depth": [ "error", 6 ],
"max-len": [ "error", 130 ],
"max-lines": "off",
"max-lines-per-function": "off",
"max-statements": "off",
"multiline-comment-style": [ "error", "separate-lines" ],
"no-extra-parens": "off",
"no-magic-numbers": "off",
"no-plusplus": "off",
"no-promise-executor-return": "off",
"no-sync": "off",
"no-tabs": "off",
"no-ternary": "off",
"no-undefined": "off",
"no-use-before-define": [ "error", { "functions": false } ],
"one-var": "off",
"operator-linebreak": [ "error", "after" ],
"padded-blocks": "off",
"prefer-destructuring": "off",
"prefer-named-capture-group": "off",
"prefer-template": "off",
"require-unicode-regexp": "off",
"sort-imports": "off",
"sort-keys": "off",

"n/no-missing-require": [ "error", { "allowModules": [ "vscode" ] } ],

"unicorn/no-array-push-push": "off",
"unicorn/no-array-reduce": "off",
"unicorn/no-null": "off",
"unicorn/prefer-module": "off",
"unicorn/prefer-string-replace-all": "off"
}
},
{
"files": [
"**/*.mjs"
],
"languageOptions": {
"sourceType": "module"
}
}
];
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"ci": "npm test && npm run test-ui",
"compile": "webpack --mode production",
"compile-debug": "webpack --mode none",
"lint": "eslint --ignore-pattern bundle.js --ignore-pattern bundle.web.js *.js *.cjs test-ui/*.cjs && markdownlint-cli2 *.md",
"lint": "eslint --ignore-pattern bundle.js --ignore-pattern bundle.web.js *.js *.cjs test-ui/*.cjs eslint.config.mjs --max-warnings 0 && markdownlint-cli2 *.md",
"schema": "cpy ./node_modules/markdownlint/schema/markdownlint-config-schema.json . --flat && cpy ./node_modules/markdownlint-cli2/schema/markdownlint-cli2-config-schema.json . --flat",
"test": "node --test --experimental-test-coverage && npm run lint && npm run compile && npm run schema && git diff --exit-code",
"test-ui": "node ./test-ui/run-tests.mjs",
Expand All @@ -46,10 +46,11 @@
"picomatch": "4.0.2"
},
"devDependencies": {
"@eslint/js": "9.1.1",
"@types/vscode": "1.75.0",
"@vscode/test-electron": "2.3.9",
"cpy-cli": "5.0.0",
"eslint": "8.56.0",
"eslint": "9.1.1",
"eslint-plugin-n": "17.2.1",
"eslint-plugin-unicorn": "52.0.0",
"path-browserify": "1.0.1",
Expand Down

0 comments on commit f9d4f3c

Please sign in to comment.