Skip to content

Instantly share code, notes, and snippets.

@itamargiv
Last active June 19, 2020 12:39
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 itamargiv/085299d0c12ae7c184eb7a49f9f66f96 to your computer and use it in GitHub Desktop.
Save itamargiv/085299d0c12ae7c184eb7a49f9f66f96 to your computer and use it in GitHub Desktop.
Wikibase Globals Report ESLint Config
module.exports = {
"env": {
"browser": true,
"commonjs": true,
"es2020": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 11,
"sourceType": "module"
},
"ignorePatterns": [
"**/tests/**/*",
"**/vendor/**/*.js",
"**/dist/**/*",
"**/build/**/*",
"**/vue.config.js",
"**/karma.conf.js"
],
"rules": {
"no-undef": "error",
"no-unused-vars": "warn",
"no-global-assign": "error",
"no-prototype-builtins": "warn"
},
"globals": {
// "mw": "readonly"
},
"noInlineConfig": true
};
{
"name": "local",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"clean": "rm -r reports",
"lint": "eslint -c .eslintrc.js --no-eslintrc",
"lint:no-color": "npm run lint -- --no-color",
"lint:no-warn": "npm run lint:no-color -- --quiet --env jquery",
"linter-report": "npm run lint:no-warn -- -o reports/linter-result.txt",
"linter-report:tbl": "npm run lint:no-warn -- -o reports/linter-result.tbl.txt -f table",
"linter-report:vsc": "npm run lint:no-warn -- -o reports/linter-result.vsc.txt -f visualstudio",
"linter-report:json": "npm run lint:no-warn -- -o reports/linter-result.json -f json",
"linter-report:warn": "npm run lint:no-color -- -o reports/linter-result-warnings.txt",
"generate:report": "run-p -ncs \"linter-report -- {1}\" \"linter-report:* -- {1}\" --",
"generate:tail": "tail -n 1 reports/linter-result.txt reports/linter-result-warnings.txt",
"report": "run-s -c clean \"generate:report -- {1}\" generate:tail --"
},
"author": "",
"license": "ISC",
"devDependencies": {
"eslint": "^7.2.0",
"npm-run-all": "^4.1.5"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment