eslint-config-soda
Advanced tools
Comparing version
{ | ||
"name": "eslint-config-soda", | ||
"version": "5.0.0", | ||
"version": "5.1.0", | ||
"description": "ESLint configurations for my personal projects", | ||
@@ -17,3 +17,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"eslint": "^2.9.0" | ||
"eslint": "^2.11.0" | ||
}, | ||
@@ -20,0 +20,0 @@ "peerDependencies": { |
@@ -33,3 +33,3 @@ // Possible Errors & Best Practices | ||
// 条件表达式不能为常数(比如 if (true) 这种) | ||
'no-constant-condition': 'error', | ||
'no-constant-condition': ['error', { checkLoops: true }], | ||
@@ -143,3 +143,3 @@ // 条件语句中没必要特地用双重否定 !! 将表达式转换为 boolean 类型 | ||
// 不过,更好的办法是直接用上 TypeScript/flow 写强类型的代码 | ||
'consistent-return': 'warn', | ||
'consistent-return': ['warn', { treatUndefinedAsUnspecified: true }], | ||
@@ -146,0 +146,0 @@ // if / else if / else / for / while / do 后面跟的代码块,必须加上花括号 {} |
@@ -67,3 +67,3 @@ module.exports = { | ||
// 是否使用 object shorthand 应该由开发者视可读性而定,不一刀切 | ||
'object-shorthand': 'off', // [1, 'always', { ignoreConstructors: true }] | ||
'object-shorthand': 'off', // [1, 'always', { avoidQuotes: true, ignoreConstructors: true }] | ||
@@ -119,4 +119,6 @@ // 如果需要使用的方法可以用 Reflect 的接口完成,则优先使用 Reflect | ||
'no-duplicate-imports': ['warn', { includeExports: false }] | ||
'no-duplicate-imports': ['error', { includeExports: false }], | ||
'no-useless-rename': 'error', | ||
} | ||
} |
@@ -203,4 +203,8 @@ module.exports = { | ||
// A line of code containing too many statements can be difficult to read | ||
'max-statements-per-line': ['warn', { max: 3 }] | ||
'max-statements-per-line': ['warn', { max: 3 }], | ||
'object-property-newline': ['warn', { allowMultiplePropertiesPerLine: true }], | ||
'unicode-bom': ['error', 'never'], | ||
} | ||
} |
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
657
0.46%40013
-4.75%15
-6.25%2
100%0
-100%1
Infinity%Updated