Skip to content

Commit

Permalink
chore: added more core configuration files
Browse files Browse the repository at this point in the history
  • Loading branch information
Samantha-uk committed Dec 28, 2020
1 parent a60292e commit 1fdb08e
Show file tree
Hide file tree
Showing 5 changed files with 2,196 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = false
7 changes: 7 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
**/*.d.ts
**/*.map
dist
node_modules
**/*.json
/common/**/*
.yarn
129 changes: 129 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
require("@rushstack/eslint-patch/modern-module-resolution");
module.exports = {
env: {
browser: true,
es6: true,
jest: true,
serviceworker: true
},
extends: [
"airbnb-typescript/base",
"plugin:@typescript-eslint/recommended",
// "plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:eslint-comments/recommended",
"plugin:promise/recommended",
"plugin:wc/recommended",
"plugin:lit/recommended",
"plugin:unicorn/recommended",
"prettier",
"prettier/@typescript-eslint"
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: {
jsx: true,
modules: true
},
ecmaVersion: 2020,
project: [
"./tsconfig.eslint.json"
],
sourceType: "module"
},
plugins: [
"@typescript-eslint",
"eslint-comments",
"import",
"lit",
"prettier",
"promise",
"unicorn"
],
root: true,
rules: {
"@typescript-eslint/naming-convention": [
"warn",
{
"format": [
"camelCase",
"PascalCase",
"UPPER_CASE"
],
"leadingUnderscore": "allow",
"selector": "variable"
},
{
"format": [
"camelCase",
"PascalCase"
],
"leadingUnderscore": "allow",
"selector": "function"
},
{
"format": [
"PascalCase"
],
"selector": "typeLike"
}
],
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/restrict-template-expressions": "off",
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"ts": "never",
"jsx": "never",
"tsx": "never"
}
],
"import/prefer-default-export": "off",
"no-param-reassign": "off",
"no-plusplus": "off",
"no-restricted-syntax": [
"error",
"LabeledStatement",
"WithStatement"
],
"no-return-assign": [
"error",
"except-parens"
],
"no-underscore-dangle": "off",
"prettier/prettier": "error",
"quotes": [
"warn",
"backtick"
],
"unicorn/no-nested-ternary": "off",
"unicorn/no-useless-undefined": "off",
"unicorn/number-literal-case": "off"
},
"settings": {
"import/extensions": [
".js",
".jsx",
".ts",
".tsx"
],
"import/parsers": {
"@typescript-eslint/parser": [
".ts",
".tsx"
]
},
"import/resolver": {
"node": {
"extensions": [
".js",
".jsx",
".ts",
".tsx"
]
}
}
}
};
Loading

0 comments on commit 1fdb08e

Please sign in to comment.