Files
shields/.eslintrc.yml
Paul Melnikow 454575c4cb Enforce no extensions in require (#1999)
This removes remaining `.js` extensions from `require()` expressions and automatically enforces this rule.
2018-09-01 11:14:01 -07:00

47 lines
1.1 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"
# 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"