0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00
verdaccio/.eslintrc
2018-12-15 16:39:51 +01:00

120 lines
3.4 KiB
Text

{
"plugins": [
"babel",
"react",
"flowtype",
"jest",
"verdaccio",
"jsx-a11y"
],
"extends": [
"eslint:recommended",
"google",
"plugin:flowtype/recommended",
"plugin:jest/recommended",
"plugin:prettier/recommended",
"plugin:react/recommended",
"plugin:verdaccio/recommended",
"plugin:jsx-a11y/recommended"
],
"settings": {
"react": {
"pragma": "React",
"version": "16.4.2",
"flowVersion": "0.81.0"
}
},
"parser": "babel-eslint",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 7,
"ecmaFeatures": {
"impliedStrict": true,
"jsx": true
}
},
"env": {
"browser": true,
"node": true,
"es6": true,
"jest": true
},
"globals": {
"__APP_VERSION__": true
},
"rules": {
"babel/no-invalid-this": 1,
"prettier/prettier": ["error", null, "@prettier"],
"react/no-deprecated": 1,
"react/jsx-no-target-blank": 1,
"react/destructuring-assignment": ["warn", "always"],
"react/forbid-component-props": ["warn", { "forbid": ["style"] }],
"react/no-this-in-sfc": ["warn"],
"react/no-unsafe": ["warn"],
"react/sort-comp": ["warn", {
"order": [
"static-methods",
"lifecycle",
"render",
"everything-else",
"/^on.+$/",
"/^render.+$/"
]
}],
"react/void-dom-elements-no-children": ["warn"],
"react/no-did-mount-set-state": ["warn", "disallow-in-func"],
"react/jsx-wrap-multilines": ["warn",{
"declaration": "parens",
"assignment": "parens",
"return": "parens",
"arrow": "parens",
"condition": "parens",
"logical": "parens",
"prop": "parens"
}],
"react/jsx-boolean-value": ["warn", "always"],
"react/jsx-closing-tag-location": ["warn"],
"react/jsx-curly-spacing": ["error", "never"],
"react/jsx-equals-spacing": ["warn", "never"],
"react/jsx-first-prop-new-line": ["warn", "multiline-multiprop"],
"react/jsx-handler-names": ["warn"],
"react/jsx-indent": ["warn", 2],
"react/jsx-indent-props": ["warn", 2],
"react/jsx-key": ["warn"],
"react/jsx-max-depth": ["warn", { "max": 2}],
"react/jsx-max-props-per-line": ["warn", {"maximum": 3, "when": "multiline" }],
"react/jsx-no-bind": ["warn"],
"react/jsx-no-comment-textnodes": ["warn"],
"react/jsx-no-duplicate-props": ["warn"],
"react/jsx-no-literals": ["warn"],
"react/jsx-no-undef": ["warn"],
"react/jsx-one-expression-per-line": ["warn", {"allow": "single-child"}],
"react/jsx-curly-brace-presence": ["warn", { "props": "always", "children": "ignore" }],
"react/jsx-pascal-case": ["warn"],
"react/jsx-props-no-multi-spaces": ["warn"],
"react/jsx-sort-default-props": ["warn"],
"react/jsx-sort-props": ["warn"],
"react/jsx-tag-spacing": ["warn", {
"closingSlash": "never",
"beforeSelfClosing": "always",
"afterOpening": "allow-multiline",
"beforeClosing": "allow"
}],
"no-useless-escape": 2,
"no-invalid-this": 0,
"handle-callback-err": 2,
"no-fallthrough": 2,
"no-new-require": 2,
"max-len": [2, 160],
"camelcase": 0,
"require-jsdoc": 0,
"valid-jsdoc": 0,
"prefer-spread": 1,
"prefer-rest-params": 1,
"linebreak-style": 0,
"quote-props":["warn", "as-needed"],
"verdaccio/jsx-no-style": ["warn"],
"verdaccio/jsx-spread": ["warn"],
"jest/expect-expect": ["warn"]
}
}