Просмотр исходного кода

clean settings file for linting

Yuki Takei 7 лет назад
Родитель
Сommit
5e426b3219
2 измененных файлов с 12 добавлено и 31 удалено
  1. 11 30
      .eslintrc.js
  2. 1 1
      package.json

+ 11 - 30
.eslintrc.js

@@ -71,7 +71,7 @@ module.exports = {
     'no-underscore-dangle': 'off',
     'no-useless-return': 'off',
     'prefer-destructuring': 'off',
-    indent: [
+    'indent': [
       'error',
       2,
       {
@@ -82,20 +82,6 @@ module.exports = {
         FunctionExpression: { body: 1, parameters: 2 },
       },
     ],
-    // "key-spacing": [
-    //   "error", {
-    //     "beforeColon": false,
-    //     "afterColon": true,
-    //     "mode": "minimum"
-    //   }
-    // ],
-    // "keyword-spacing": [
-    //   "error", {}
-    // ],
-    // "linebreak-style": [
-    //   "error",
-    //   "unix"
-    // ],
     'no-unused-vars': [
       'error',
       { args: 'none' },
@@ -105,6 +91,15 @@ module.exports = {
       { classes: 'always' },
     ],
     'radix': 'off',
+    'semi': [
+      'error',
+      'always',
+      { omitLastInOneLineBlock: true },
+    ],
+    'space-before-function-paren': [
+      'error',
+      'never',
+    ],
     'react/destructuring-assignment': 'off',
     'react/forbid-prop-types': 'off',
     'react/jsx-filename-extension': [
@@ -118,22 +113,8 @@ module.exports = {
     'react/require-default-props': 'off',
     'react/self-closing-comp': 'off',
     'react/sort-comp': 'off',
-    // "react/jsx-uses-vars": 1,
-    // "react/no-string-refs": "off",
     'jsx-a11y/img-redundant-alt': 'off',
-    semi: [
-      'error',
-      'always',
-      { omitLastInOneLineBlock: true },
-    ],
-    // "space-before-blocks": [
-    //   "error",
-    //   "always"
-    // ],
-    'space-before-function-paren': [
-      'error',
-      'never',
-    ],
+    // eslint-plugin-import rules
     'import/no-extraneous-dependencies': 'off',
     'import/no-dynamic-require': 'off',
     'import/no-unresolved': [2, { ignore: ['^@'] }], // ignore @alias/..., @commons/..., ...

+ 1 - 1
package.json

@@ -32,7 +32,7 @@
     "clean:report": "rimraf -- report",
     "clean": "npm-run-all -p clean:*",
     "heroku-postbuild": "sh bin/heroku/install-plugins.sh && npm run build:prod",
-    "lint:js:fix": "eslint src/migrations --fix",
+    "lint:js:fix": "eslint . --fix",
     "lint:js": "eslint .",
     "lint:styles:fix": "prettier-stylelint --quiet --write src/client/styles/scss/**/*.scss",
     "lint:styles": "stylelint src/client/styles/scss/**/*.scss",