🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

eslint-config-soda

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-soda - npm Package Compare versions

Comparing version

to
5.1.0

4

package.json
{
"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'],
}
}