eslint-config-soda
Advanced tools
Comparing version 5.1.0 to 5.2.0
module.exports = { | ||
extends: [ | ||
'eslint-config-soda/rules/esnext', | ||
'./rules/esnext.js', | ||
'eslint-config-soda/rules/best-practices', | ||
'eslint-config-soda/rules/complexity', | ||
'eslint-config-soda/rules/strict', | ||
'eslint-config-soda/rules/style', | ||
'eslint-config-soda/rules/variables', | ||
'./rules/best-practices.js', | ||
'./rules/complexity.js', | ||
'./rules/strict.js', | ||
'./rules/style.js', | ||
'./rules/variables.js', | ||
// must be placed after esnext in order to override some of its rules | ||
'eslint-config-soda/rules/browser' | ||
] | ||
'./rules/browser.js', | ||
], | ||
} |
20
index.js
module.exports = { | ||
extends: [ | ||
'eslint-config-soda/rules/esnext', | ||
',/rules/esnext.js', | ||
'eslint-config-soda/rules/best-practices', | ||
'eslint-config-soda/rules/complexity', | ||
'eslint-config-soda/rules/strict', | ||
'eslint-config-soda/rules/style', | ||
'eslint-config-soda/rules/variables', | ||
'./rules/best-practices.js', | ||
'./rules/complexity.js', | ||
'./rules/strict.js', | ||
'./rules/style.js', | ||
'./rules/variables.js', | ||
// must be placed after esnext in order to override some of its rules | ||
'eslint-config-soda/rules/legacy', | ||
'eslint-config-soda/rules/browser', | ||
'eslint-config-soda/rules/node' | ||
] | ||
'./rules/legacy.js', | ||
'./rules/browser.js', | ||
'./rules/node.js', | ||
], | ||
} |
module.exports = { | ||
extends: [ | ||
'eslint-config-soda/rules/best-practices', | ||
'eslint-config-soda/rules/complexity', | ||
'eslint-config-soda/rules/strict', | ||
'eslint-config-soda/rules/style', | ||
'eslint-config-soda/rules/variables', | ||
'./rules/best-practices.js', | ||
'./rules/complexity.js', | ||
'./rules/strict.js', | ||
'./rules/style.js', | ||
'./rules/variables.js', | ||
// must be placed after esnext in order to override some of its rules | ||
'eslint-config-soda/rules/browser', | ||
// must be placed after esnext in order to override some of its rules | ||
'./rules/browser.js', | ||
'eslint-config-soda/rules/legacy' | ||
] | ||
'./rules/legacy.js', | ||
], | ||
} |
16
node.js
module.exports = { | ||
extends: [ | ||
'eslint-config-soda/rules/esnext', | ||
'./rules/esnext.js', | ||
'eslint-config-soda/rules/best-practices', | ||
'eslint-config-soda/rules/complexity', | ||
'eslint-config-soda/rules/strict', | ||
'eslint-config-soda/rules/style', | ||
'eslint-config-soda/rules/variables', | ||
'./rules/best-practices.js', | ||
'./rules/complexity.js', | ||
'./rules/strict.js', | ||
'./rules/style.js', | ||
'./rules/variables.js', | ||
'eslint-config-soda/rules/node' | ||
] | ||
'./rules/node.js', | ||
], | ||
} |
{ | ||
"name": "eslint-config-soda", | ||
"version": "5.1.0", | ||
"version": "5.2.0", | ||
"description": "ESLint configurations for my personal projects", | ||
@@ -17,6 +17,6 @@ "main": "index.js", | ||
"dependencies": { | ||
"eslint": "^2.11.0" | ||
"eslint": "^2.12.0" | ||
}, | ||
"peerDependencies": { | ||
"eslint": "^2.9.0" | ||
"eslint": "^2.12.0" | ||
}, | ||
@@ -23,0 +23,0 @@ "files": [ |
@@ -63,2 +63,5 @@ // Possible Errors & Best Practices | ||
// 这个规则实施起来太繁琐,暂时也不启用 | ||
'no-mixed-operators': 'off', | ||
// 多余的分号会警告 | ||
@@ -65,0 +68,0 @@ 'no-extra-semi': 'warn', |
/* eslint-disable no-magic-numbers */ | ||
module.exports = { | ||
rules: { | ||
// 单个文件最多 300 行 | ||
'max-lines': ['warn', { max: 300, skipBlankLines: true, skipComments: true }], | ||
// 单个函数最多有 50 行(内部的其他函数定义不算) | ||
@@ -5,0 +8,0 @@ 'max-statements': ['warn', { max: 50 }], |
@@ -31,2 +31,5 @@ module.exports = { | ||
// Whitespace is not allowed between spread operators and their expressions | ||
'rest-spread-spacing': ['warn', 'never'], | ||
// It’s unnecessary to use computed properties with literals | ||
@@ -109,3 +112,3 @@ 'no-useless-computed-key': 'error', | ||
// Require braces in arrow function body when there might be confusions | ||
'arrow-body-style': ['warn', 'as-needed'], | ||
'arrow-body-style': ['warn', 'as-needed', { requireReturnForObjectLiteral: false }], | ||
@@ -112,0 +115,0 @@ // sort import statements |
@@ -91,2 +91,6 @@ module.exports = { | ||
// Requires line breaks if there are line breaks inside properties or between properties | ||
// Otherwise, disallows line breaks | ||
// 'object-curly-newline': ['warn', { multiline: true }], | ||
// 对于数组的话,个人觉得不带空格更美观 | ||
@@ -93,0 +97,0 @@ 'array-bracket-spacing': ['warn', 'never'], |
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
40179
666
Updatedeslint@^2.12.0