Last active
May 12, 2019 11:35
-
-
Save xeptore/620a07827f62787311fa03df4ebe3c97 to your computer and use it in GitHub Desktop.
eslint configurations for Node apps with Jest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
env: | |
es6: true | |
node: true | |
commonjs: true | |
jest: true | |
jest/globals: true | |
plugins: | |
- jest | |
extends: | |
- 'eslint:recommended' | |
- 'plugin:import/errors' | |
- 'plugin:import/warnings' | |
- 'plugin:jest/recommended' | |
globals: | |
Atomics: readonly | |
SharedArrayBuffer: readonly | |
parserOptions: | |
ecmaVersion: 6 | |
sourceType: module | |
rules: | |
keyword-spacing: 2 | |
no-trailing-spaces: 2 | |
no-multiple-empty-lines: 2 | |
eol-last: 2 | |
no-tabs: 2 | |
no-nested-ternary: 2 | |
no-extra-semi: 2 | |
constructor-super: 2 | |
array-bracket-spacing: | |
- 2 | |
- never | |
no-var: 2 | |
max-len: | |
- 1 | |
- | |
code: 85 | |
tabWidth: 2 | |
no-func-assign: 2 | |
consistent-return: 2 | |
curly: | |
- 2 | |
- all | |
default-case: 2 | |
eqeqeq: | |
- 2 | |
- always | |
no-multi-spaces: 2 | |
array-bracket-newline: | |
- 2 | |
- consistent | |
comma-dangle: | |
- 2 | |
- always-multiline | |
comma-spacing: 2 | |
no-console: 0 | |
indent: | |
- 2 | |
- 2 | |
linebreak-style: | |
- 2 | |
- unix | |
quotes: | |
- 2 | |
- single | |
semi: | |
- 2 | |
- always | |
import/newline-after-import: | |
- 2 | |
- | |
count: 2 | |
jest/no-disabled-tests: warn | |
jest/no-focused-tests: error | |
jest/no-identical-title: error | |
jest/prefer-to-have-length: warn | |
jest/valid-expect: error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
also install dollowing packages:
npm:
yarn: