Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Commit

Permalink
Update eslint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
rozsival committed Oct 11, 2019
1 parent 9dfebe4 commit c4db85d
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 18 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
module.exports = {
extends: require.resolve('./ts/eslint/base'),
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wavevision/coding-standard",
"version": "1.1.0",
"version": "1.1.1",
"description": "The Wavevision SCSS and TypeScript coding standard.",
"repository": {
"type": "git",
Expand Down
1 change: 0 additions & 1 deletion scss/postcss.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint @typescript-eslint/no-var-requires: 'off' */
const autoprefixer = require('autoprefixer');
const linter = require('postcss-bem-linter');
const reporter = require('postcss-reporter');
Expand Down
1 change: 0 additions & 1 deletion ts/babel/react.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint @typescript-eslint/no-var-requires: 'off' */
const { presets, plugins } = require('./base');

if (process.env.NODE_ENV === 'production') {
Expand Down
13 changes: 10 additions & 3 deletions ts/eslint/base.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint @typescript-eslint/no-var-requires: 'off' */
const configs = require('./configs');

const productionError =
Expand All @@ -20,7 +19,7 @@ module.exports = {
modules: true,
},
},
plugins: ['@typescript-eslint', 'import', 'jest'],
plugins: ['@typescript-eslint', 'import', 'jest', 'prettier'],
globals: {
window: true,
document: true,
Expand All @@ -38,7 +37,9 @@ module.exports = {
'consistent-return': 'off',
curly: ['error', 'multi-line'],
'default-case': 'off',
'function-paren-newline': 'off',
'guard-for-in': 'off',
'implicit-arrow-linebreak': 'off',
'import/no-extraneous-dependencies': 'off',
'import/first': 'off',
'import/order': [
Expand All @@ -65,10 +66,16 @@ module.exports = {
'spaced-comment': 'off',
'no-console': productionError,
'no-debugger': productionError,
'object-curly-newline': ['error', { consistent: true }],
'operator-linebreak': [
'error',
'after',
{ overrides: { '?': 'before', ':': 'before' } },
{
overrides: {
'?': 'before',
':': 'before',
},
},
],
},
settings: {
Expand Down
14 changes: 2 additions & 12 deletions ts/eslint/react.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint @typescript-eslint/no-var-requires: 'off' */
const base = require('./base');
const configs = require('./configs');

Expand All @@ -11,14 +10,7 @@ module.exports = {
'jsx-a11y/interactive-supports-focus': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/label-has-associated-control': 'off',
'jsx-a11y/label-has-for': [
'error',
{
required: {
every: ['id'],
},
},
],
'jsx-a11y/label-has-for': ['error', { required: { every: ['id'] } }],
'react/destructuring-assignment': 'off',
'react/jsx-boolean-value': 'off',
'react/jsx-curly-brace-presence': [
Expand All @@ -34,8 +26,6 @@ module.exports = {
},
settings: {
...base.settings,
react: {
version: 'detect',
},
react: { version: 'detect' },
},
};

0 comments on commit c4db85d

Please sign in to comment.