Skip to content

Commit

Permalink
16.0.0 (#229)
Browse files Browse the repository at this point in the history
* Add eslint-plugin-unicorn

Closes #140

* Remove jest and mocha environments from config

Closes #220

* Move jest config to extends instead of overrides

Closes #221

* Avoid name conflict

* Update peer deps
  • Loading branch information
tclindner authored Oct 4, 2020
1 parent aef68f6 commit eb8e4c1
Show file tree
Hide file tree
Showing 6 changed files with 256 additions and 56 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ First thing first, let's make sure you have the necessary pre-requisites.
npx install-peerdeps --dev eslint-config-tc
```

> eslint, eslint-plugin-import, eslint-plugin-prettier, and prettier are peer dependencies and must be installed.
> eslint, eslint-plugin-eslint-comments, eslint-plugin-import, eslint-plugin-jest, eslint-plugin-prettier, eslint-plugin-unicorn, and prettier are peer dependencies and must be installed.
## Usage

Expand Down
53 changes: 5 additions & 48 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,24 @@ const node = require.resolve('./rules/node');
const style = require.resolve('./rules/style');
const variables = require.resolve('./rules/variables');
const prettier = require.resolve('./rules/prettier');
const jestRules = require.resolve('./rules/jest');

module.exports = {
extends: [
'eslint-config-airbnb-base',
'eslint:recommended',
'eslint-config-prettier',
'plugin:eslint-comments/recommended',
'plugin:jest/recommended',
'plugin:unicorn/recommended',
bestPractices,
errors,
es6,
node,
style,
variables,
prettier,
jestRules,
],
plugins: ['jest', 'prettier'],
parserOptions: {
Expand All @@ -33,65 +37,18 @@ module.exports = {
},
overrides: [
{
files: ['**/*.spec.js', '**/*.test.js', '**/tests-*.js'],
env: {
jest: true,
mocha: true,
},
files: ['**/*.spec.js', '**/*.test.js', '**/tests-*.js', '**/*.spec.ts', '**/*.test.ts', '**/tests-*.ts'],
rules: {
'array-bracket-newline': 'off',
'array-element-newline': 'off',
'eslint-comments/no-unused-disable': 'error',
'id-length': 'off',
'jest/consistent-test-it': [
'error',
{
fn: 'test',
withinDescribe: 'test',
},
],
'jest/expect-expect': 'error',
'jest/no-alias-methods': 'error',
'jest/no-commented-out-tests': 'error',
'jest/no-conditional-expect': 'error',
'jest/no-deprecated-functions': 'error',
'jest/no-interpolation-in-snapshots': 'error',
'jest/no-disabled-tests': 'error',
'jest/no-duplicate-hooks': 'error',
'jest/no-export': 'error',
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
'jest/no-if': 'error',
'jest/no-jasmine-globals': 'error',
'jest/no-jest-import': 'error',
'jest/no-large-snapshots': 'error',
'jest/no-standalone-expect': 'error',
'jest/no-test-prefixes': 'error',
'jest/no-done-callback': 'error',
'jest/no-test-return-statement': 'error',
'jest/no-truthy-falsy': 'error',
'jest/no-try-expect': 'error',
'jest/prefer-called-with': 'error',
'jest/prefer-hooks-on-top': 'error',
'jest/prefer-strict-equal': 'error',
'jest/prefer-to-be-null': 'error',
'jest/prefer-to-be-undefined': 'error',
'jest/prefer-to-contain': 'error',
'jest/prefer-to-have-length': 'error',
'jest/prefer-todo': 'error',
'jest/require-to-throw-message': 'error',
'jest/require-top-level-describe': 'error',
'jest/valid-describe': 'error',
'jest/valid-expect-in-promise': 'error',
'jest/valid-expect': 'error',
'jest/valid-title': 'error',
'max-lines': 'off',
'max-lines-per-function': 'off',
'max-nested-callbacks': 'off',
'max-statements': 'off',
'newline-after-var': 'off',
'no-process-env': 'off',
'no-undefined': 'off',
'object-curly-newline': 'off',
'padding-line-between-statements': [
'error',
Expand Down
Loading

0 comments on commit eb8e4c1

Please sign in to comment.