eslint-config-onelint
Advanced tools
Comparing version 1.0.2 to 1.1.0
@@ -38,2 +38,3 @@ { | ||
"no-undef": [2], | ||
"no-unreachable": [2], | ||
"no-unused-vars": [2, { "args": "none" }], | ||
@@ -40,0 +41,0 @@ "semi": [2, "always"], |
{ | ||
"name": "eslint-config-onelint", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "eslint configuration for one.com code style", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -6,2 +6,5 @@ # onelint eslint configuration | ||
If you write React code, consider including | ||
[eslint-config-onelint-react](https://github.com/One-com/eslint-config-onelint-react) | ||
## Usage | ||
@@ -42,2 +45,36 @@ | ||
### Turn off ES6 parser module | ||
Code like the following will break in es6 parser mode, but work just fine in es5: | ||
```js | ||
loadingQueue.await(...) | ||
``` | ||
It can be handled by setting the following options in `.eslintrc.js`: | ||
```js | ||
module.exports = { | ||
extends: [ | ||
'onelint' | ||
], | ||
env: { | ||
es6: false | ||
}, | ||
parserOptions: null | ||
}; | ||
``` | ||
It's not always that it causes problems, so I'll not make the default es5 now. | ||
If it turns out to be a major problem, we could release an es5 version of this | ||
package too, with the above configuration extended on top. | ||
The above fix is also necessary when you're code will not work in mode. | ||
ES6 modules are enabled in the parsing options, which implicitly enables strict | ||
mode. That will cause, among other things, cause octals to be considered invalid: | ||
```js | ||
var someOctalValue = 0200; | ||
``` | ||
## Configuration | ||
@@ -44,0 +81,0 @@ |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
29570
46
138
127
1