eslint-config-nrk
Advanced tools
Comparing version 4.0.0 to 5.0.2-beta.0
{ | ||
"name": "eslint-config-nrk", | ||
"version": "4.0.0", | ||
"version": "5.0.2-beta.0", | ||
"description": "A shared ESLint configuration for and by JavaScript developers at NRK.", | ||
@@ -11,3 +11,4 @@ "main": "base.js", | ||
"test": "mocha --require babel-register test/**/*.spec.js", | ||
"test-travis": "istanbul cover _mocha -- --require babel-register -R spec ./test/**/*.spec.js" | ||
"test-travis": "istanbul cover _mocha -- --require babel-register -R spec ./test/**/*.spec.js", | ||
"diff": "node ./bin/diff.js && echo '\nnpm update eslint to get latest rules'" | ||
}, | ||
@@ -29,12 +30,17 @@ "pre-commit": [ | ||
"peerDependencies": { | ||
"eslint": "^3.4.0" | ||
"eslint": "^3.11.1" | ||
}, | ||
"publishConfig": { | ||
"registry": "https://registry.npmjs.org/" | ||
}, | ||
"devDependencies": { | ||
"babel-preset-es2015": "6.14.0", | ||
"babel-register": "6.14.0", | ||
"babel-preset-es2015": "^6.18.0", | ||
"babel-register": "^6.18.0", | ||
"chai": "3.5.0", | ||
"coveralls": "2.11.12", | ||
"eslint": "3.4.0", | ||
"coveralls": "^2.11.15", | ||
"eslint": "^3.11.1", | ||
"eslint-plugin-react": "^6.8.0", | ||
"istanbul": "1.0.0-alpha.2", | ||
"mocha": "3.0.2", | ||
"lodash.difference": "^4.5.0", | ||
"mocha": "^3.2.0", | ||
"mocha-lcov-reporter": "1.2.0", | ||
@@ -41,0 +47,0 @@ "pre-commit": "1.1.3" |
@@ -26,2 +26,3 @@ module.exports = { | ||
'no-else-return': 2, // http://eslint.org/docs/rules/no-else-return | ||
'no-empty-function': 1, // http://eslint.org/docs/rules/no-empty-function | ||
'no-eq-null': 2, // http://eslint.org/docs/rules/no-eq-null | ||
@@ -31,2 +32,3 @@ 'no-eval': 2, // http://eslint.org/docs/rules/no-eval | ||
'no-extra-bind': 2, // http://eslint.org/docs/rules/no-extra-bind | ||
'no-extra-label': 2, // http://eslint.org/docs/rules/no-extra-label | ||
'no-fallthrough': 2, // http://eslint.org/docs/rules/no-fallthrough | ||
@@ -43,2 +45,3 @@ 'no-floating-decimal': 2, // http://eslint.org/docs/rules/no-floating-decimal | ||
], | ||
'no-implicit-globals': 2, // http://eslint.org/docs/rules/no-implicit-globals | ||
'no-implied-eval': 2, // http://eslint.org/docs/rules/no-implied-eval | ||
@@ -61,3 +64,5 @@ 'no-iterator': 2, // http://eslint.org/docs/rules/no-iterator | ||
'no-redeclare': 2, // http://eslint.org/docs/rules/no-redeclare | ||
'no-restricted-properties': 0, // http://eslint.org/docs/rules/no-restricted-properties | ||
'no-return-assign': 2, // http://eslint.org/docs/rules/no-return-assign | ||
'no-return-await': 2, // http://eslint.org/docs/rules/no-return-await | ||
'no-script-url': 2, // http://eslint.org/docs/rules/no-script-url | ||
@@ -68,2 +73,3 @@ 'no-self-assign': 2, // http://eslint.org/docs/rules/no-self-assign | ||
'no-throw-literal': 2, // http://eslint.org/docs/rules/no-throw-literal | ||
'no-unmodified-loop-condition': 2, // http://eslint.org/docs/rules/no-unmodified-loop-condition | ||
'no-unused-expressions': [ // http://eslint.org/docs/rules/no-unused-expressions | ||
@@ -79,2 +85,3 @@ 2, { | ||
'no-useless-escape': 2, // http://eslint.org/docs/rules/no-useless-escape | ||
'no-useless-return': 2, // http://eslint.org/docs/rules/no-useless-return | ||
'no-void': 2, // http://eslint.org/docs/rules/no-void | ||
@@ -84,2 +91,3 @@ 'no-warning-comments': 2, // http://eslint.org/docs/rules/no-warning-comments | ||
radix: 2, // http://eslint.org/docs/rules/radix | ||
'require-await': 2, // http://eslint.org/docs/rules/require-await | ||
'vars-on-top': 0, // http://eslint.org/docs/rules/vars-on-top | ||
@@ -86,0 +94,0 @@ 'wrap-iife': [2, 'any'], // http://eslint.org/docs/rules/wrap-iife |
@@ -14,3 +14,7 @@ module.exports = { | ||
'no-new-symbol': 2, // http://eslint.org/docs/rules/no-new-symbol | ||
'no-restricted-imports': 0, // http://eslint.org/docs/rules/no-restricted-imports | ||
'no-this-before-super': 2, // http://eslint.org/docs/rules/no-this-before-super | ||
'no-useless-computed-key': 2, // http://eslint.org/docs/rules/no-useless-computed-key | ||
'no-useless-constructor': 2, // http://eslint.org/docs/rules/no-useless-constructor | ||
'no-useless-rename': 2, // http://eslint.org/docs/rules/no-useless-rename | ||
'no-var': 2, // http://eslint.org/docs/rules/no-var | ||
@@ -20,2 +24,4 @@ 'object-shorthand': 1, // http://eslint.org/docs/rules/object-shorthand | ||
'prefer-const': 2, // http://eslint.org/docs/rules/prefer-const | ||
'prefer-numeric-literals': 0, // http://eslint.org/docs/rules/prefer-numeric-literals | ||
'prefer-rest-params': 2, // http://eslint.org/docs/rules/prefer-rest-params | ||
'prefer-spread': 2, // http://eslint.org/docs/rules/prefer-spread | ||
@@ -25,4 +31,11 @@ 'prefer-reflect': 0, // http://eslint.org/docs/rules/prefer-reflect | ||
'require-yield': 0, // http://eslint.org/docs/rules/require-yield | ||
'symbol-description': 2 // http://eslint.org/docs/rules/symbol-description | ||
'rest-spread-spacing': 0, // http://eslint.org/docs/rules/rest-spread-spacing | ||
'sort-imports': 0, // http://eslint.org/docs/rules/sort-imports | ||
'symbol-description': 2, // http://eslint.org/docs/rules/symbol-description | ||
'template-curly-spacing': 0, // http://eslint.org/docs/rules/template-curly-spacing | ||
'yield-star-spacing': [ // http://eslint.org/docs/rules/yield-star-spacing | ||
2, | ||
'after' | ||
] | ||
} | ||
}; |
@@ -13,2 +13,3 @@ module.exports = { | ||
'react/jsx-filename-extension': 0, // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md | ||
'react/jsx-first-prop-new-line': 0, // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-first-prop-new-line.md | ||
'jsx-first-prop-new-line': 0, // github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-first-prop-new-line.md | ||
@@ -37,2 +38,3 @@ 'react/jsx-handler-names': 1, // github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md | ||
'react/jsx-space-before-closing': [2, 'always'], // github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-space-before-closing.md | ||
'react/jsx-tag-spacing': 0, // github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-tag-spacing.md | ||
'react/jsx-uses-react': 2, // github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-react.md | ||
@@ -39,0 +41,0 @@ 'react/jsx-uses-vars': 2, // github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-vars.md |
@@ -12,4 +12,4 @@ module.exports = { | ||
'no-restricted-modules': 0, | ||
'no-sync': 2 | ||
'no-sync': 1 | ||
} | ||
}; |
@@ -27,2 +27,3 @@ module.exports = { | ||
'no-obj-calls': 2, // http://eslint.org/docs/rules/no-obj-calls | ||
'no-prototype-builtins': 1, // http://eslint.org/docs/rules/no-prototype-builtins | ||
'no-regex-spaces': 2, // http://eslint.org/docs/rules/no-regex-spaces | ||
@@ -32,2 +33,3 @@ 'no-sparse-arrays': 2, // http://eslint.org/docs/rules/no-sparse-arrays | ||
'no-unreachable': 2, // http://eslint.org/docs/rules/no-unreachable | ||
'no-unsafe-finally': 2, // http://eslint.org/docs/rules/no-unsafe-finally | ||
'no-unsafe-negation': 2, // http://eslint.org/docs/rules/no-unsafe-negation | ||
@@ -34,0 +36,0 @@ 'use-isnan': 2, // http://eslint.org/docs/rules/use-isnan |
@@ -6,5 +6,7 @@ module.exports = { | ||
rules: { | ||
'react/no-array-index-key': 2, // github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md | ||
'react/display-name': 0, // github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/display-name.md | ||
'react/forbid-component-props': 0, // github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-component-props.md | ||
'react/forbid-prop-types': 0, // github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-prop-types.md | ||
'react/no-children-prop': 2, // github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-children-prop.md | ||
'react/no-danger': 1, // github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger.md | ||
@@ -25,2 +27,4 @@ 'react/no-danger-with-children': 2, // github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger-with-children.md | ||
'react/no-set-state': 0, // github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-set-state.md | ||
'react/no-string-refs': 1, // github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-string-refs.md | ||
'react/no-unescaped-entities': 2, // github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unescaped-entities.md | ||
'react/no-unknown-property': 2, // github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md | ||
@@ -32,2 +36,3 @@ 'react/no-unused-prop-types': 0, // github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unused-prop-types.md | ||
'react/react-in-jsx-scope': 2, // github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/react-in-jsx-scope.md | ||
'react/require-default-props': 0, // github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-default-props.md | ||
'react/require-optimization': 0, // github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-optimization.md | ||
@@ -34,0 +39,0 @@ 'react/require-render-return': 2, // github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-render-return.md |
@@ -11,2 +11,3 @@ module.exports = { | ||
], | ||
'capitalized-comments': 0, // http://eslint.org/docs/rules/capitalized-comments | ||
'comma-spacing': [ // http://eslint.org/docs/rules/comma-spacing | ||
@@ -25,4 +26,6 @@ 2, { | ||
'func-call-spacing': 0, // http://eslint.org/docs/rules/func-call-spacing | ||
'func-name-matching': 0, // http://eslint.org/docs/rules/func-name-matching | ||
'func-names': 0, // http://eslint.org/docs/rules/func-names | ||
'func-style': 0, // http://eslint.org/docs/rules/func-style | ||
'id-blacklist': 0, // http://eslint.org/docs/rules/id-blacklist | ||
'id-length': 0, // http://eslint.org/docs/rules/id-length, | ||
@@ -44,6 +47,14 @@ 'id-match': 0, // http://eslint.org/docs/rules/id-match | ||
'keyword-spacing': 0, // http://eslint.org/docs/rules/keyword-spacing | ||
'line-comment-position': 0, // http://eslint.org/docs/rules/line-comment-position | ||
'linebreak-style': [2, 'unix'], // http://eslint.org/docs/rules/linebreak-style | ||
'lines-around-comment': 2, // http://eslint.org/docs/rules/lines-around-comment | ||
'lines-around-comment': 0, // http://eslint.org/docs/rules/lines-around-comment | ||
'lines-around-directive': [ // http://eslint.org/docs/rules/lines-around-directive | ||
'error', { | ||
before: 'never', | ||
after: 'always' | ||
} | ||
], | ||
'max-depth': [2, 4], // http://eslint.org/docs/rules/max-depth | ||
'max-len': [0, 80], // http://eslint.org/docs/rules/max-len | ||
'max-lines': [1, 500], // http://eslint.org/docs/rules/max-len | ||
'max-nested-callbacks': [2, 3], // http://eslint.org/docs/rules/max-nested-callbacks | ||
@@ -62,2 +73,3 @@ 'max-params': [2, 3], // http://eslint.org/docs/rules/max-params | ||
'newline-before-return': 0, // http://eslint.org/docs/rules/newline-before-return | ||
'newline-per-chained-call': 0, // http://eslint.org/docs/rules/newline-per-chained-call | ||
'no-array-constructor': 2, // http://eslint.org/docs/rules/no-array-constructor | ||
@@ -68,2 +80,3 @@ 'no-bitwise': 2, // http://eslint.org/docs/rules/no-bitwise | ||
'no-lonely-if': 2, // http://eslint.org/docs/rules/no-lonely-if | ||
'no-mixed-operators': 2, // http://eslint.org/docs/rules/no-mixed-operators | ||
'no-mixed-spaces-and-tabs': [ // http://eslint.org/docs/rules/no-mixed-spaces-and-tabs | ||
@@ -94,14 +107,10 @@ 2, | ||
'no-unneeded-ternary': 2, // http://eslint.org/docs/rules/no-unneeded-ternary | ||
'no-whitespace-before-property': 2, // http://eslint.org/docs/rules/no-whitespace-before-property | ||
'object-curly-newline': 0, // http://eslint.org/docs/rules/object-curly-newline | ||
'object-curly-spacing': 0, // http://eslint.org/docs/rules/object-curly-spacing | ||
'object-property-newline': 0, // http://eslint.org/docs/rules/object-curly-spacing | ||
'one-var-declaration-per-line': 0, // http://eslint.org/docs/rules/one-var-declaration-per-line | ||
'one-var': 0, // http://eslint.org/docs/rules/one-var | ||
'operator-assignment': 0, // http://eslint.org/docs/rules/operator-assignment | ||
'operator-linebreak': [ // http://eslint.org/docs/rules/operator-linebreak | ||
2, | ||
'before', | ||
{ | ||
overrides: { | ||
'?': 'after' | ||
} | ||
} | ||
], | ||
'operator-linebreak': 0, // http://eslint.org/docs/rules/operator-linebreak | ||
'padded-blocks': 0, // http://eslint.org/docs/rules/padded-blocks | ||
@@ -121,4 +130,5 @@ 'quote-props': [2, 'as-needed'], // http://eslint.org/docs/rules/quote-props | ||
'spaced-comment': 0, // http://eslint.org/docs/rules/spaced-comment | ||
'unicode-bom': 0, // http://eslint.org/docs/rules/unicode-bom | ||
'wrap-regex': 0, // http://eslint.org/docs/rules/wrap-regex | ||
} | ||
}; |
@@ -8,7 +8,7 @@ /* global describe, it */ | ||
function keysStartWith (keys, str) { | ||
return keys.filter((key) => key.indexOf(str) === 0).length === keys.length; | ||
return keys.every((key) => key.indexOf(str) === 0); | ||
} | ||
function keysDoNotStartWith (keys, str) { | ||
return keys.filter((key) => key.indexOf(str) === -1).length === keys.length; | ||
return keys.every((key) => key.indexOf(str) === -1); | ||
} | ||
@@ -15,0 +15,0 @@ |
Sorry, the diff of this file is not supported yet
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
39549
23
553
11
2
3