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

Commit c4db85d

Browse files
committed
Update eslint rules
1 parent 9dfebe4 commit c4db85d

File tree

6 files changed

+16
-18
lines changed

6 files changed

+16
-18
lines changed

.eslintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
module.exports = {
22
extends: require.resolve('./ts/eslint/base'),
3+
rules: {
4+
'@typescript-eslint/no-var-requires': 'off',
5+
},
36
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@wavevision/coding-standard",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description": "The Wavevision SCSS and TypeScript coding standard.",
55
"repository": {
66
"type": "git",

scss/postcss.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint @typescript-eslint/no-var-requires: 'off' */
21
const autoprefixer = require('autoprefixer');
32
const linter = require('postcss-bem-linter');
43
const reporter = require('postcss-reporter');

ts/babel/react.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint @typescript-eslint/no-var-requires: 'off' */
21
const { presets, plugins } = require('./base');
32

43
if (process.env.NODE_ENV === 'production') {

ts/eslint/base.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint @typescript-eslint/no-var-requires: 'off' */
21
const configs = require('./configs');
32

43
const productionError =
@@ -20,7 +19,7 @@ module.exports = {
2019
modules: true,
2120
},
2221
},
23-
plugins: ['@typescript-eslint', 'import', 'jest'],
22+
plugins: ['@typescript-eslint', 'import', 'jest', 'prettier'],
2423
globals: {
2524
window: true,
2625
document: true,
@@ -38,7 +37,9 @@ module.exports = {
3837
'consistent-return': 'off',
3938
curly: ['error', 'multi-line'],
4039
'default-case': 'off',
40+
'function-paren-newline': 'off',
4141
'guard-for-in': 'off',
42+
'implicit-arrow-linebreak': 'off',
4243
'import/no-extraneous-dependencies': 'off',
4344
'import/first': 'off',
4445
'import/order': [
@@ -65,10 +66,16 @@ module.exports = {
6566
'spaced-comment': 'off',
6667
'no-console': productionError,
6768
'no-debugger': productionError,
69+
'object-curly-newline': ['error', { consistent: true }],
6870
'operator-linebreak': [
6971
'error',
7072
'after',
71-
{ overrides: { '?': 'before', ':': 'before' } },
73+
{
74+
overrides: {
75+
'?': 'before',
76+
':': 'before',
77+
},
78+
},
7279
],
7380
},
7481
settings: {

ts/eslint/react.js

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint @typescript-eslint/no-var-requires: 'off' */
21
const base = require('./base');
32
const configs = require('./configs');
43

@@ -11,14 +10,7 @@ module.exports = {
1110
'jsx-a11y/interactive-supports-focus': 'off',
1211
'jsx-a11y/click-events-have-key-events': 'off',
1312
'jsx-a11y/label-has-associated-control': 'off',
14-
'jsx-a11y/label-has-for': [
15-
'error',
16-
{
17-
required: {
18-
every: ['id'],
19-
},
20-
},
21-
],
13+
'jsx-a11y/label-has-for': ['error', { required: { every: ['id'] } }],
2214
'react/destructuring-assignment': 'off',
2315
'react/jsx-boolean-value': 'off',
2416
'react/jsx-curly-brace-presence': [
@@ -34,8 +26,6 @@ module.exports = {
3426
},
3527
settings: {
3628
...base.settings,
37-
react: {
38-
version: 'detect',
39-
},
29+
react: { version: 'detect' },
4030
},
4131
};

0 commit comments

Comments
 (0)