mirror of
https://github.com/RetroShare/RSNewWebUI.git
synced 2026-09-13 18:45:49 +05:00
Add editor config and update additional lint rules (#29)
* add editor config and additional lint rules * add prettierignore config
This commit is contained in:
parent
d3eb8d6d91
commit
8564c38970
20
webui-src/.editorconfig
Normal file
20
webui-src/.editorconfig
Normal file
@ -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 = 4
|
||||
|
||||
# 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
|
||||
@ -1,4 +1,5 @@
|
||||
{
|
||||
"root": true,
|
||||
"env": {
|
||||
"browser": true,
|
||||
"commonjs": true,
|
||||
@ -7,11 +8,14 @@
|
||||
"extends": "eslint:recommended",
|
||||
"globals": {
|
||||
"Atomics": "readonly",
|
||||
"SharedArrayBuffer": "readonly"
|
||||
"SharedArrayBuffer": "readonly",
|
||||
"window": "readonly",
|
||||
"document": "readonly"
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2018
|
||||
},
|
||||
"ignorePatterns": ["mithril.js", "assets/*", "make-src/*"],
|
||||
"rules": {
|
||||
"indent": [
|
||||
"error",
|
||||
@ -28,6 +32,33 @@
|
||||
"semi": [
|
||||
"error",
|
||||
"always"
|
||||
]
|
||||
],
|
||||
"arrow-spacing": ["error", { "before": true, "after": true }],
|
||||
"arrow-parens": ["error", "always"],
|
||||
"comma-style": ["error", "last"],
|
||||
"comma-spacing": ["error", { "before": false, "after": true }],
|
||||
"camelcase": ["error", {
|
||||
"allow": ["^UNSAFE_"],
|
||||
"properties": "never",
|
||||
"ignoreGlobals": true
|
||||
}],
|
||||
"eol-last": "error",
|
||||
"eqeqeq": ["error", "always", { "null": "ignore" }],
|
||||
"no-irregular-whitespace": ["error"],
|
||||
"no-trailing-spaces": ["error"],
|
||||
"no-unexpected-multiline": ["error"],
|
||||
"no-unreachable": ["error"],
|
||||
"no-var": "warn",
|
||||
"no-unused-vars": ["error", {
|
||||
"args": "none",
|
||||
"caughtErrors": "none",
|
||||
"ignoreRestSiblings": true,
|
||||
"vars": "all",
|
||||
"no-use-before-define": ["warn", { "functions": true, "classes": false }],
|
||||
"object-shorthand": "error",
|
||||
"prefer-const": ["error", { "destructuring": "all" }],
|
||||
"semi-style": ["warn", "last"],
|
||||
"spaced-comment": ["warn", "always"]
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
||||
7
webui-src/.prettierrc
Normal file
7
webui-src/.prettierrc
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"arrowParens": "always",
|
||||
"printWidth": 100,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "es5",
|
||||
"bracketSpacing": true
|
||||
}
|
||||
1
webui-src/make-src/.prettierignore
Normal file
1
webui-src/make-src/.prettierignore
Normal file
@ -0,0 +1 @@
|
||||
*
|
||||
Loading…
Reference in New Issue
Block a user