eslint-config-kswedberg
Advanced tools
Comparing version 3.1.1 to 3.2.0
@@ -13,3 +13,3 @@ const rulesets = require('./rulesets'); | ||
parserOptions: { | ||
ecmaVersion: 2018, | ||
ecmaVersion: 2019, | ||
sourceType: 'module', | ||
@@ -16,0 +16,0 @@ ecmaFeatures: { |
{ | ||
"name": "eslint-config-kswedberg", | ||
"version": "3.1.1", | ||
"version": "3.2.0", | ||
"description": "A shareable eslint config", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
32
react.js
const rulesets = require('./rulesets'); | ||
const rules = Object.assign( | ||
{}, | ||
rulesets.variables, | ||
rulesets.possibleErrors, | ||
rulesets.es6, | ||
rulesets.bestPractices, | ||
rulesets.stylistic | ||
); | ||
const config = require('./index.js'); | ||
module.exports = { | ||
parserOptions: { | ||
ecmaVersion: 2018, | ||
sourceType: 'module', | ||
ecmaFeatures: { | ||
jsx: true, | ||
impliedStrict: true, | ||
}, | ||
}, | ||
config.parserOptions.ecmaFeatures = { | ||
jsx: true, | ||
impliedStrict: true, | ||
}; | ||
module.exports = Object.assign(config, { | ||
plugins: [ | ||
@@ -28,8 +18,2 @@ 'react', | ||
}, | ||
globals: { | ||
FM: true, | ||
Modernizr: false, | ||
}, | ||
rules: rules, | ||
}; | ||
}); |
@@ -1,5 +0,5 @@ | ||
module.exports.variables = { | ||
'no-delete-var': 'error', | ||
'no-undef': 'error', | ||
'no-undef-init': 'warn', | ||
'no-use-before-define': 'error', | ||
@@ -11,6 +11,18 @@ }; | ||
'no-cond-assign': ['warn', 'except-parens'], | ||
'no-dupe-args': 'warn', | ||
'no-dupe-keys': 'warn', | ||
'no-empty': 'warn', | ||
'no-extra-parens': [ | ||
'warn', | ||
'all', | ||
{ | ||
nestedBinaryExpressions: false, | ||
ignoreJSX: 'all', | ||
}, | ||
], | ||
'no-extra-semi': 'warn', | ||
'no-inner-declarations': 'error', | ||
'no-invalid-regexp': 'error', | ||
'no-obj-calls': 'warn', | ||
'no-regex-spaces': 'warn', | ||
}; | ||
@@ -25,2 +37,3 @@ | ||
'no-const-assign': 'error', | ||
'no-import-assign': 'warn', | ||
'no-duplicate-imports': 'warn', | ||
@@ -37,3 +50,3 @@ 'no-return-await': 'warn', | ||
'prefer-template': 'warn', | ||
'require-await': 'off', | ||
'require-await': 'warn', | ||
'rest-spread-spacing': ['warn', 'never'], | ||
@@ -46,2 +59,3 @@ 'template-curly-spacing': ['warn', 'never'], | ||
curly: ['warn', 'all'], | ||
'dot-location': ['warn', 'property'], | ||
'dot-notation': [ | ||
@@ -164,2 +178,3 @@ 'warn', | ||
{ | ||
ignoreComments: true, | ||
MemberExpression: 0, | ||
@@ -166,0 +181,0 @@ }, |
26
vue.js
@@ -5,25 +5,11 @@ // Requires vue eslint plugin: | ||
// yarn add -D eslint eslint-plugin-vue | ||
const config = require('./index.js'); | ||
const {vue} = require('./rulesets'); | ||
const rulesets = require('./rulesets'); | ||
const rules = Object.assign( | ||
{}, | ||
rulesets.variables, | ||
rulesets.possibleErrors, | ||
rulesets.es6, | ||
rulesets.bestPractices, | ||
rulesets.stylistic, | ||
rulesets.vue, | ||
); | ||
Object.assign(config.rules, vue); | ||
module.exports = { | ||
module.exports = Object.assign(config, { | ||
extends: [ | ||
'plugin:vue/essential', | ||
], | ||
parserOptions: { | ||
ecmaVersion: 2019, | ||
sourceType: 'module', | ||
ecmaFeatures: { | ||
impliedStrict: true, | ||
}, | ||
}, | ||
plugins: [ | ||
@@ -37,4 +23,2 @@ 'vue', | ||
}, | ||
rules: rules, | ||
}; | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11832
460