Skip to content

Commit

Permalink
Use base eslint rules (#1358)
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Golovin <dgolovin@redhat.com>
  • Loading branch information
dgolovin committed Jan 23, 2020
1 parent 1263e9a commit 2e49514
Show file tree
Hide file tree
Showing 8 changed files with 1,689 additions and 1,132 deletions.
20 changes: 20 additions & 0 deletions .editorconfig
@@ -0,0 +1,20 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# http://editorconfig.org/

root = true

[*]

# Change these settings to your own preference
indent_style = space
indent_size = 2

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
7 changes: 7 additions & 0 deletions .eslintignore
@@ -0,0 +1,7 @@
.yarn
__coverage__
public/dist
*.min.js
public/lib
node_modules
Godeps
76 changes: 76 additions & 0 deletions .eslintrc
@@ -0,0 +1,76 @@
{
"root": true,
"env": {
"browser": true,
"es6": true,
"jasmine": true
},
"extends": [
"airbnb-base",
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier",
"prettier/@typescript-eslint"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"comment": true,
"project": "./tsconfig.json",
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "prettier"],
"settings": {
"import/core-modules": [ "vscode" ],
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {},
"node": {
"extensions": [
".js",
".jsx",
".ts"
]
}
},
"import/extensions": [
".js",
".jsx",
".ts"
]
}, "rules": {
"camelcase": 2,
"consistent-return": 0,
"consistent-this": [1, "that"],
"curly": [2, "all"],
"default-case": [2],
"dot-notation": [2],
"no-multiple-empty-lines": [2, { "max": 2, "maxEOF": 0 }],
"eqeqeq": [2, "allow-null"],
"guard-for-in": 2,
"import/no-unresolved": ["error"],
"import/no-duplicates": ["error"],
"max-nested-callbacks": [1, 4],
"no-alert": 2,
"no-caller": 2,
"no-console": 2,
"no-constant-condition": 2,
"no-debugger": 2,
"no-else-return": ["error"],
"no-global-strict": 0,
"no-irregular-whitespace": ["error"],
"no-shadow": ["error"],
"no-underscore-dangle": 0,
"@typescript-eslint/no-use-before-define": 2,
"@typescript-eslint/await-thenable": "error",
"no-var": 2,
"object-shorthand": ["error", "properties"],
"prefer-const": ["error", { "destructuring": "all" }],
"prefer-template": 2,
"radix": 2
}
}
26 changes: 0 additions & 26 deletions .eslintrc.js

This file was deleted.

6 changes: 6 additions & 0 deletions .prettierrc
@@ -0,0 +1,6 @@
{
"arrowParens": "always",
"printWidth": 100,
"singleQuote": true,
"trailingComma": "all"
}
3 changes: 2 additions & 1 deletion .vscode/settings.json
Expand Up @@ -8,5 +8,6 @@
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off",
"debug.node.autoAttach": "off"
"debug.node.autoAttach": "off",
"eslint.enable": true
}

0 comments on commit 2e49514

Please sign in to comment.