build(frontend): account for moved eslint config file with new syntax
This commit is contained in:
parent
de6811372b
commit
115d2e2629
@ -1,30 +0,0 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true,
|
||||
"jasmine": true
|
||||
},
|
||||
"extends": "eslint:recommended",
|
||||
"globals": {
|
||||
"Atomics": "readonly",
|
||||
"SharedArrayBuffer": "readonly",
|
||||
"flatpickr": "readonly",
|
||||
"$": "readonly"
|
||||
},
|
||||
"parser": "@babel/eslint-parser",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2018,
|
||||
"requireConfigFile": false,
|
||||
"ecmaFeatures": {
|
||||
"legacyDecorators": true
|
||||
}
|
||||
},
|
||||
"rules": {
|
||||
"no-console": "off",
|
||||
"no-extra-semi": "off",
|
||||
"semi": ["error", "always"],
|
||||
"comma-dangle": ["error", "always-multiline"],
|
||||
"quotes": ["error", "single"],
|
||||
"no-var": "error"
|
||||
}
|
||||
}
|
||||
2
Makefile
2
Makefile
@ -107,7 +107,7 @@ frontend-%: node_modules well-known --frontend-%;
|
||||
--frontend-watch: --frontend-build
|
||||
|
||||
.PHONY: --frontend-lint
|
||||
--frontend-lint: .eslintrc.json
|
||||
--frontend-lint: eslint.config.js
|
||||
npx -- eslint frontend/src $(FIX)
|
||||
@echo Hooray! There are no hints.
|
||||
|
||||
|
||||
33
eslint.config.js
Normal file
33
eslint.config.js
Normal file
@ -0,0 +1,33 @@
|
||||
import js from "@eslint/js";
|
||||
import globals from "globals";
|
||||
import babelParser from "@babel/eslint-parser";
|
||||
|
||||
export default [
|
||||
js.configs.recommended,
|
||||
{
|
||||
files: ["**/*.js"],
|
||||
plugins: {},
|
||||
languageOptions: {
|
||||
ecmaVersion: 2018,
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.es6,
|
||||
...globals.node,
|
||||
...globals.jasmine,
|
||||
Atomics: "readonly",
|
||||
SharedArrayBuffer: "readonly",
|
||||
flatpickr: "readonly",
|
||||
$: "readonly",
|
||||
},
|
||||
parser: babelParser,
|
||||
},
|
||||
rules: {
|
||||
"no-console": "off",
|
||||
"no-extra-semi": "off",
|
||||
"semi": ["error", "always"],
|
||||
"comma-dangle": ["error", "always-multiline"],
|
||||
"quotes": ["error", "single"],
|
||||
"no-var": "error",
|
||||
},
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user