Skip to content

Instantly share code, notes, and snippets.

@hail2u
Last active March 13, 2023 10:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hail2u/b6e3aa353e983b697a598938883b3cbe to your computer and use it in GitHub Desktop.
Save hail2u/b6e3aa353e983b697a598938883b3cbe to your computer and use it in GitHub Desktop.
{
"env": {
"es6": true,
"node": true
},
"globals": {
"AbortController": true,
"fetch": true,
"FormData": true
},
"ignorePatterns": [ "**/*.min.js" ],
"overrides": [
{
"env": {
"browser": true
},
"files": [ "static/js/**/*.js" ]
}
],
"parser": "@babel/eslint-parser",
"parserOptions": {
"babelOptions": {
"plugins": [
"@babel/plugin-syntax-import-assertions"
]
},
"requireConfigFile": false
},
"root": true,
"rules": {
"eqeqeq": "error"
}
}
import babelESLintParser from "@babel/eslint-parser";
import globals from "globals";
export default [
{
ignores: [ "**/*.min.js" ],
languageOptions: {
globals: {
...globals.node,
AbortController: true,
FormData: true,
fetch: true
},
parser: "babel/eslint-parser",
parserOptions: {
babelOptions: {
plugins: [
"@babel/plugin-syntax-import-assertions"
]
},
requireConfigFile: false
}
},
plugins: {
babel: {
parsers: {
"eslint-parser": babelESLintParser
}
}
},
rules: {
eqeqeq: "error"
}
},
{
files: [ "static/js/**/*.js" ],
languageOptions: {
globals: {
...globals.browser
}
}
}
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment