aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard/assets/.eslintrc
diff options
context:
space:
mode:
authorKurkó Mihály <kurkomisi@users.noreply.github.com>2017-12-21 23:54:38 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-12-21 23:54:38 +0800
commit9dbb8ef4aadb8e40aef8b681cf86acd20789abdc (patch)
treec020de9b45dffa878b1422dce147d9343ed8b59b /dashboard/assets/.eslintrc
parent52f4d6dd7891191a494f37faa6bce664e202da66 (diff)
downloadgo-tangerine-9dbb8ef4aadb8e40aef8b681cf86acd20789abdc.tar
go-tangerine-9dbb8ef4aadb8e40aef8b681cf86acd20789abdc.tar.gz
go-tangerine-9dbb8ef4aadb8e40aef8b681cf86acd20789abdc.tar.bz2
go-tangerine-9dbb8ef4aadb8e40aef8b681cf86acd20789abdc.tar.lz
go-tangerine-9dbb8ef4aadb8e40aef8b681cf86acd20789abdc.tar.xz
go-tangerine-9dbb8ef4aadb8e40aef8b681cf86acd20789abdc.tar.zst
go-tangerine-9dbb8ef4aadb8e40aef8b681cf86acd20789abdc.zip
dashboard: integrate Flow, sketch message API (#15713)
* dashboard: minor design change * dashboard: Flow integration, message API * dashboard: minor polishes, exclude misspell linter
Diffstat (limited to 'dashboard/assets/.eslintrc')
-rw-r--r--dashboard/assets/.eslintrc97
1 files changed, 64 insertions, 33 deletions
diff --git a/dashboard/assets/.eslintrc b/dashboard/assets/.eslintrc
index 04ae15d01..67c11dcc0 100644
--- a/dashboard/assets/.eslintrc
+++ b/dashboard/assets/.eslintrc
@@ -16,37 +16,68 @@
// React syntax style mostly according to https://github.com/airbnb/javascript/tree/master/react
{
- "plugins": [
- "react"
- ],
- "parser": "babel-eslint",
- "parserOptions": {
- "ecmaFeatures": {
- "jsx": true,
- "modules": true
- }
- },
- "rules": {
- "react/prefer-es6-class": 2,
- "react/prefer-stateless-function": 2,
- "react/jsx-pascal-case": 2,
- "react/jsx-closing-bracket-location": [1, {"selfClosing": "tag-aligned", "nonEmpty": "tag-aligned"}],
- "react/jsx-closing-tag-location": 1,
- "jsx-quotes": ["error", "prefer-double"],
- "no-multi-spaces": "error",
- "react/jsx-tag-spacing": 2,
- "react/jsx-curly-spacing": [2, {"when": "never", "children": true}],
- "react/jsx-boolean-value": 2,
- "react/no-string-refs": 2,
- "react/jsx-wrap-multilines": 2,
- "react/self-closing-comp": 2,
- "react/jsx-no-bind": 2,
- "react/require-render-return": 2,
- "react/no-is-mounted": 2,
- "key-spacing": ["error", {"align": {
- "beforeColon": false,
- "afterColon": true,
- "on": "value"
- }}]
- }
+ 'env': {
+ 'browser': true,
+ 'node': true,
+ 'es6': true,
+ },
+ 'parser': 'babel-eslint',
+ 'parserOptions': {
+ 'sourceType': 'module',
+ 'ecmaVersion': 6,
+ 'ecmaFeatures': {
+ 'jsx': true,
+ }
+ },
+ 'extends': 'airbnb',
+ 'plugins': [
+ 'flowtype',
+ 'react',
+ ],
+ 'rules': {
+ 'no-tabs': 'off',
+ 'indent': ['error', 'tab'],
+ 'react/jsx-indent': ['error', 'tab'],
+ 'react/jsx-indent-props': ['error', 'tab'],
+ 'react/prefer-stateless-function': 'off',
+
+ // Specifies the maximum length of a line.
+ 'max-len': ['warn', 120, 2, {
+ 'ignoreUrls': true,
+ 'ignoreComments': false,
+ 'ignoreRegExpLiterals': true,
+ 'ignoreStrings': true,
+ 'ignoreTemplateLiterals': true,
+ }],
+ // Enforces spacing between keys and values in object literal properties.
+ 'key-spacing': ['error', {'align': {
+ 'beforeColon': false,
+ 'afterColon': true,
+ 'on': 'value'
+ }}],
+ // Prohibits padding inside curly braces.
+ 'object-curly-spacing': ['error', 'never'],
+ 'no-use-before-define': 'off', // messageAPI
+ 'default-case': 'off',
+
+ 'flowtype/boolean-style': ['error', 'boolean'],
+ 'flowtype/define-flow-type': 'warn',
+ 'flowtype/generic-spacing': ['error', 'never'],
+ 'flowtype/no-primitive-constructor-types': 'error',
+ 'flowtype/no-weak-types': 'error',
+ 'flowtype/object-type-delimiter': ['error', 'comma'],
+ 'flowtype/require-valid-file-annotation': 'error',
+ 'flowtype/semi': ['error', 'always'],
+ 'flowtype/space-after-type-colon': ['error', 'always'],
+ 'flowtype/space-before-generic-bracket': ['error', 'never'],
+ 'flowtype/space-before-type-colon': ['error', 'never'],
+ 'flowtype/union-intersection-spacing': ['error', 'always'],
+ 'flowtype/use-flow-type': 'warn',
+ 'flowtype/valid-syntax': 'warn',
+ },
+ 'settings': {
+ 'flowtype': {
+ 'onlyFilesWithFlowAnnotation': true,
+ }
+ },
}