Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
feat: ✨ update some rules
  • Loading branch information
nnmrts committed Jun 18, 2020
1 parent 9795c0e commit 043b3c2
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
1 change: 1 addition & 0 deletions rules/es6.js
Expand Up @@ -4,6 +4,7 @@ module.exports = {
},
parser: "babel-eslint",
parserOptions: {
allowAwaitOutsideFunction: true,
ecmaFeatures: {
generators: false,
objectLiteralDuplicateProperties: false
Expand Down
13 changes: 11 additions & 2 deletions rules/imports.js
Expand Up @@ -2,6 +2,15 @@ module.exports = {
env: {
es6: true
},
overrides: [
{
files: "babel.config.js",
rules: {
"import/no-commonjs": "off",
"import/no-unused-modules": "off"
}
}
],
parserOptions: {
ecmaVersion: 6,
sourceType: "module"
Expand Down Expand Up @@ -110,9 +119,9 @@ module.exports = {
"import/no-unused-modules": [
"error",
{
ignoreExports: [`${process.cwd()}/index.js`, `${process.cwd()}/src/index.js`],
ignoreExports: ["./src/index.js", "./index.js"],
missingExports: true,
unusedExports: true
unusedExports: false
}
],
"import/no-useless-path-segments": [
Expand Down
2 changes: 1 addition & 1 deletion rules/jsdoc.js
Expand Up @@ -6,7 +6,6 @@ module.exports = {
"jsdoc/check-examples": [
"warn",
{
captionRequired: true,
configFile: "./.example.eslintrc"
}
],
Expand Down Expand Up @@ -50,6 +49,7 @@ module.exports = {
"FunctionDeclaration",
"FunctionExpression"
],
publicOnly: true,
require: {
ArrowFunctionExpression: true,
ClassDeclaration: true,
Expand Down
5 changes: 3 additions & 2 deletions rules/style.js
Expand Up @@ -55,7 +55,8 @@ module.exports = {
exceptions: [
"x",
"y",
"z"
"z",
"_"
],
max: 35,
min: 2
Expand Down Expand Up @@ -113,7 +114,7 @@ module.exports = {
}
],
"new-parens": "error",
"no-bitwise": "error",
"no-bitwise": "off",
"no-continue": "error",
"no-lonely-if": "error",
"no-mixed-operators": [
Expand Down
4 changes: 3 additions & 1 deletion rules/style/whitespace.js
Expand Up @@ -85,7 +85,9 @@ module.exports = {
"after",
{
overrides: {
"=": "none"
":": "before",
"?": "before",
"|>": "before"
}
}
],
Expand Down

0 comments on commit 043b3c2

Please sign in to comment.