Skip to content
This repository was archived by the owner on Oct 20, 2022. It is now read-only.

Commit 76aa1ed

Browse files
authored
Merge pull request #225 from netlify/chore/linting
chore: improve linting
2 parents d6e9d53 + c335be6 commit 76aa1ed

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

.eslintrc.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,7 @@ const { overrides } = require('@netlify/eslint-config-node')
33
module.exports = {
44
extends: ['plugin:fp/recommended', '@netlify/eslint-config-node'],
55
rules: {
6-
// Those rules from @netlify/eslint-config-node are currently disabled
7-
// TODO: remove, so those rules are enabled
8-
'fp/no-mutation': 0,
9-
'no-magic-numbers': 0,
10-
'max-lines': 0,
11-
'max-statements': 0,
12-
complexity: 0,
6+
'fp/no-mutation': [2, { commonjs: true }],
137
},
148
overrides: [...overrides],
159
}

tests/line_parser.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,12 @@ each(
9090
},
9191
{
9292
title: 'conditions_country',
93+
// eslint-disable-next-line no-magic-numbers
9394
output: [{ path: '/', to: '/china', status: 302, conditions: { Country: 'ch,tw' } }],
9495
},
9596
{
9697
title: 'conditions_country_language',
98+
// eslint-disable-next-line no-magic-numbers
9799
output: [{ path: '/', to: '/china', status: 302, conditions: { Country: 'il', Language: 'en' } }],
98100
},
99101
{
@@ -110,6 +112,7 @@ each(
110112
{
111113
path: '/donate',
112114
to: '/donate/usa?source=:source&email=:email',
115+
// eslint-disable-next-line no-magic-numbers
113116
status: 302,
114117
query: { source: ':source', email: ':email' },
115118
conditions: { Country: 'us' },

0 commit comments

Comments
 (0)