Skip to content
Permalink
Browse files

Eslint config: ignore deprecated rules when diffing Nitro

We do keep track of deprecated rules and it doesn't make sense to make them compatible since they are never going to be used in our config.

kiwicom-source-id: 98154d67e38f95d070aa4a7aa2f4a71dbff937c8
  • Loading branch information...
mrtnzlml authored and kiwicom-github-bot committed Jun 4, 2019
1 parent 575ea69 commit 8bc79acfed98dc75fdc9abe28ba2209d4a70ffdb
Showing with 4 additions and 7 deletions.
  1. +0 −6 __tests__/__snapshots__/nitroDifferences.test.js.snap
  2. +4 −1 __tests__/nitroDifferences.test.js
@@ -230,13 +230,7 @@ E - flowtype/space-before-generic-bracket ("off" vs. ["error","never"])
E - flowtype/space-before-type-colon ("off" vs. ["error","never"])
E - flowtype/union-intersection-spacing ("off" vs. ["error","always"])
E - prettier/prettier,1,printWidth (80 vs. 100)
N - no-native-reassign ("off")
N - no-negated-in-lhs ("off")
N - lines-around-directive (["error",{"before":"always","after":"always"}])
N - newline-after-var ("off")
N - newline-before-return ("off")
N - no-catch-shadow ("off")
N - prefer-reflect ("off")
N - react/jsx-sort-prop-types ("off")
N - fp/no-nil ("off")
N - fp/no-class ("off")
@@ -2,6 +2,8 @@

import { diff } from 'deep-diff';

import deprecatedRules from './deprecatedRules';

const CLIEngine = require('eslint').CLIEngine;

expect.addSnapshotSerializer({
@@ -72,7 +74,8 @@ function normalize(config) {
if (Array.isArray(value)) {
const [level, ...config] = value;
acc[ruleName] = normalizeArrayConfig([normalizeLevel(level), ...config]);
} else {
} else if (!deprecatedRules.has(ruleName)) {
// add only rules which are not deprecated
acc[ruleName] = normalizeLevel(value);
}
return acc;

0 comments on commit 8bc79ac

Please sign in to comment.
You can’t perform that action at this time.