feat: add eslint

This commit is contained in:
Yarmo Mackenbach 2024-06-21 16:18:38 +02:00
parent c4b8423c6a
commit fc50fd56a9
No known key found for this signature in database
GPG key ID: C248C28D432560ED
3 changed files with 1191 additions and 601 deletions

20
eslint.config.js Normal file
View file

@ -0,0 +1,20 @@
import globals from "globals";
import pluginJs from "@eslint/js";
export default [
{
languageOptions: { globals: globals.node },
rules: {
"no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_",
}
]
}
},
pluginJs.configs.recommended,
];

1764
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -29,11 +29,14 @@
}, },
"devDependencies": { "devDependencies": {
"@biomejs/biome": "1.8.2", "@biomejs/biome": "1.8.2",
"@eslint/js": "^9.5.0",
"@vercel/ncc": "^0.34.0", "@vercel/ncc": "^0.34.0",
"chai": "^4.3.6", "chai": "^4.3.6",
"copy-webpack-plugin": "^11.0.0", "copy-webpack-plugin": "^11.0.0",
"css-loader": "^6.6.0", "css-loader": "^6.6.0",
"eslint": "^9.5.0",
"esmock": "^2.5.0", "esmock": "^2.5.0",
"globals": "^15.6.0",
"license-check-and-add": "^4.0.5", "license-check-and-add": "^4.0.5",
"mini-css-extract-plugin": "^2.5.3", "mini-css-extract-plugin": "^2.5.3",
"mocha": "^10.1.0", "mocha": "^10.1.0",
@ -56,11 +59,12 @@
"build:server": "ncc build ./src/index.js -o dist", "build:server": "ncc build ./src/index.js -o dist",
"build:static": "webpack --config webpack.config.js --env static=true --env mode=production", "build:static": "webpack --config webpack.config.js --env static=true --env mode=production",
"build:static:dev": "webpack --config webpack.config.js --env static=true --env mode=development", "build:static:dev": "webpack --config webpack.config.js --env static=true --env mode=development",
"lint": "npm run standard:check & npm run biome:check", "lint": "npm run standard:check & npm run eslint:check & npm run biome:check",
"standard:check": "standard ./src", "standard:check": "standard ./src",
"standard:fix": "standard --fix ./src", "standard:fix": "standard --fix ./src",
"biome:check": "npx @biomejs/biome check ./src", "biome:check": "npx @biomejs/biome check ./src",
"biome:fix": "npx @biomejs/biome check --apply ./src", "biome:fix": "npx @biomejs/biome check --apply ./src",
"eslint:check": "npx eslint ./src/**",
"license:check": "license-check-and-add check", "license:check": "license-check-and-add check",
"license:add": "license-check-and-add add", "license:add": "license-check-and-add add",
"license:remove": "license-check-and-add remove" "license:remove": "license-check-and-add remove"