Skip to content

Commit

Permalink
add build scripts to eslinting (#91)
Browse files Browse the repository at this point in the history
* Include build scripts in lint target
* add build script .eslintrc overrides

Document the overrides used by the build scripts.
Most of them should be removed during the future cleanup.
  • Loading branch information
nyurik authored Feb 22, 2021
1 parent cb5ba83 commit 256d1b8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
21 changes: 21 additions & 0 deletions build/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
// TODO: most of these overrides should be removed,
// but for now this documents the exceptions used by the code in this dir
"rules": {
"import/no-commonjs": "off",
"flowtype/require-valid-file-annotation": [0],
"prefer-arrow-callback": "off",
"no-var": "off",
"strict": "off",
"no-restricted-properties": "off",
"no-unused-vars": "off",
"prefer-template": "off",
"camelcase": "off",
"prefer-const": "off",
"indent": "off",
"no-case-declarations": "off",
"semi": "off",
"object-curly-spacing": "off",
"no-undef": "off"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
"start-release": "run-s build-token build-prod-min build-css print-release-url start-server",
"diff-tarball": "cross-env build/run-node build/diff-tarball && echo \"Please confirm the above is correct [y/n]? \"; read answer; if [ \"$answer\" = \"${answer#[Yy]}\" ]; then false; fi",
"prepare-publish": "git clean -fdx && yarn install",
"lint": "eslint --cache --ignore-path .gitignore src test bench debug/*.html",
"lint": "eslint --cache --ignore-path .gitignore src test bench build debug/*.html",
"lint-docs": "documentation lint src/index.js",
"lint-css": "stylelint 'src/css/maplibre-gl.css'",
"test": "run-s lint lint-css lint-docs test-flow test-unit",
Expand Down

0 comments on commit 256d1b8

Please sign in to comment.