Files
shields/.eslintrc.yml
Paul Melnikow 07b282fa1f Enforce property shorthand (#2243)
I had to track down the right lint rule for this. We have no-useless-rename for destructuring and import/export. The one for object literals is object-shorthand.
2018-11-01 13:46:23 -04:00

48 lines
1.2 KiB
YAML

extends:
- standard
- prettier
env:
node: true
mocha: true
parserOptions:
# Override eslint-config-standard, which incorrectly sets this to "module",
# though that setting is only for ES6 modules, not CommonJS modules.
sourceType: "script"
plugins:
- mocha
- no-extension-in-require
- "chai-friendly"
rules:
# Disable some rules from eslint:recommended.
no-console: "off"
no-empty: ["error", { "allowEmptyCatch": true }]
# Allow unused parameters. In callbacks, removing them seems to obscure
# what the functions are doing.
no-unused-vars: ["error", {"args": "none"}]
# These should be disabled by eslint-config-prettier, but are not.
spaced-comment: "off"
standard/object-curly-even-spacing: "off"
one-var: "off"
# Shields additions.
no-var: "error"
prefer-const: "error"
strict: "error"
arrow-body-style: ["error", "as-needed"]
no-extension-in-require/main: "error"
object-shorthand: ["error", "properties"]
# Mocha-related.
mocha/no-exclusive-tests: "error"
mocha/no-mocha-arrows: "error"
mocha/prefer-arrow-callback: "error"
# Chai friendly.
no-unused-expressions: "off"
chai-friendly/no-unused-expressions: "error"