Skip to content

Commit

Permalink
Merge branch 'eslint-bundle'
Browse files Browse the repository at this point in the history
  • Loading branch information
JimiC committed Apr 12, 2020
2 parents 8536f69 + d4f8e96 commit ad11e19
Show file tree
Hide file tree
Showing 55 changed files with 3,282 additions and 1,476 deletions.
202 changes: 202 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
{
"env": {
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],
"ignorePatterns": [
"node_modules",
"submodules",
"dist",
"bin",
"lib",
"examples",
"out",
"coverage",
"/.*",
"/*.*",
".*",
"*.d.ts"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "import", "prettier"],
"rules": {
"@typescript-eslint/camelcase": [
"error",
{
"allow": ["file", "folder"]
}
],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/array-type": [
"error",
{
"default": "array-simple"
}
],
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/ban-ts-comment": [
"error",
{
"ts-ignore": false
}
],
"@typescript-eslint/class-name-casing": "error",
"@typescript-eslint/consistent-type-definitions": "error",
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "explicit",
"overrides": {
"constructors": "no-public"
}
}
],
"@typescript-eslint/indent": "off",
"@typescript-eslint/interface-name-prefix": [
"error",
{ "prefixWithI": "always" }
],
"@typescript-eslint/member-ordering": "error",
"@typescript-eslint/no-empty-function": "error",
"@typescript-eslint/no-parameter-properties": [
"error",
{
"allows": ["private", "protected"]
}
],
"@typescript-eslint/no-use-before-define": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/quotes": [
"error",
"single",
{
"allowTemplateLiterals": true
}
],
"@typescript-eslint/semi": "error",
"@typescript-eslint/unified-signatures": "error",
"import/no-unresolved": [
"error",
{
"ignore": ["vscode", "\\.json$"]
}
],
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": ["**/test/**"]
}
],
"import/no-internal-modules": [
"error",
{
"allow": ["**/src/**", "**/fixtures/**", "**/inversify/**"]
}
],
"prettier/prettier": "error",
"arrow-body-style": "error",
"arrow-parens": ["error", "as-needed"],
"comma-dangle": ["error", "always-multiline"],
"complexity": "off",
"curly": "error",
"dot-notation": "error",
"eol-last": "error",
"eqeqeq": ["error", "smart"],
"guard-for-in": "error",
"id-blacklist": ["error", "any", "number", "string", "boolean"],
"id-match": "error",
"indent": "off",
"max-classes-per-file": ["error", 1],
"max-len": [
"error",
{
"code": 120
}
],
"new-parens": "error",
"no-bitwise": "error",
"no-caller": "error",
"no-console": [
"error",
{
"allow": ["info", "error"]
}
],
"no-duplicate-imports": "error",
"no-eval": "error",
"no-extra-bind": "error",
"no-invalid-this": "error",
"no-multiple-empty-lines": "error",
"no-new-func": "error",
"no-new-wrappers": "error",
"no-return-await": "error",
"no-sequences": "error",
"no-shadow": [
"error",
{
"hoist": "all"
}
],
"no-template-curly-in-string": "error",
"no-throw-literal": "error",
"no-trailing-spaces": "error",
"no-undef-init": "error",
"no-underscore-dangle": [
"error",
{
"allow": [
"_watch",
"_file",
"_file_light",
"_folder",
"_folder_open",
"_folder_light",
"_folder_light_open",
"_root_folder",
"_root_folder_open",
"_root_folder_light",
"_root_folder_light_open"
]
}
],
"no-unused-expressions": "error",
"object-shorthand": "error",
"one-var": ["error", "never"],
"prefer-arrow-callback": "error",
"prefer-object-spread": "error",
"quote-props": ["error", "as-needed"],
"radix": "error",
"space-before-function-paren": [
"error",
{
"anonymous": "always",
"named": "never",
"asyncArrow": "always"
}
],
"space-in-parens": ["error", "never"],
"spaced-comment": [
"error",
"always",
{
"markers": ["#region", "#endregion"]
}
]
}
}
2 changes: 1 addition & 1 deletion .huskyrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"skipCI": true,
"hooks": {
"pre-commit": "npm run compile && git add ."
"pre-commit": "lint-staged && rollup -c && git add ."
}
}
6 changes: 6 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"src/**/*.ts": [
"prettier --write",
"eslint . --ext .ts"
]
}
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.md
package*.json
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}
6 changes: 4 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"recommendations": [
"ms-vscode.vscode-typescript-tslint-plugin",
"EditorConfig.EditorConfig"
"dbaeumer.vscode-eslint",
"EditorConfig.EditorConfig",
"DavidAnson.vscode-markdownlint",
"esbenp.prettier-vscode"
]
}
15 changes: 14 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"files.associations": {
".huskyrc": "json",
".lintstagedrc": "json"
},
"typescript.tsdk": "./node_modules/typescript/lib"
}
Loading

0 comments on commit ad11e19

Please sign in to comment.