Skip to content

Commit

Permalink
feat: move to diplodoc configs
Browse files Browse the repository at this point in the history
  • Loading branch information
v8tenko committed Oct 12, 2023
1 parent 2b1184b commit 7af5282
Show file tree
Hide file tree
Showing 9 changed files with 981 additions and 704 deletions.
13 changes: 2 additions & 11 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
{
"presets": [
"@babel/env",
"@babel/react",
"@babel/typescript"
],
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-transform-runtime",
"@babel/plugin-syntax-top-level-await",
"babel-plugin-lodash"
]
"presets": [["@diplodoc/babel-preset", { "typescript": true }]],
"plugins": ["babel-plugin-lodash"]
}
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
webpack.config.js
build
190 changes: 1 addition & 189 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,196 +1,8 @@
{
"extends": ["eslint:recommended", "plugin:react/recommended"],
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2019
},
"extends": ["@diplodoc/eslint-config", "plugin:react/recommended"],
"env": {
"es6": true,
"browser": true
},
"rules": {
"no-empty": 0,
"valid-jsdoc": [1, {
"requireParamDescription": false,
"requireReturnDescription": false
}],
"array-callback-return": 2,
"block-scoped-var": 1,
"complexity": 1,
"consistent-return": 1,
"curly": 2,
"dot-location": [2, "property"],
"eqeqeq": [1, "always"],
"guard-for-in": 2,
"no-caller": 2,
"no-div-regex": 1,
"no-eq-null": 2,
"no-eval": 1,
"no-extend-native": 2,
"no-extra-bind": 1,
"no-extra-label": 2,
"no-floating-decimal": 2,
"no-global-assign": 1,
"no-implicit-coercion": 1,
"no-implicit-globals": 1,
"no-implied-eval": 1,
"no-iterator": 2,
"no-labels": 2,
"no-loop-func": 2,
"no-multi-spaces": 2,
"no-new": 2,
"no-new-func": 1,
"no-new-wrappers": 2,
"no-octal-escape": 2,
"no-param-reassign": 1,
"no-proto": 2,
"no-return-assign": [2, "always"],
"no-script-url": 2,
"no-self-compare": 2,
"no-sequences": 2,
"no-throw-literal": 1,
"no-unmodified-loop-condition": 2,
"no-unused-expressions": 2,
"no-useless-call": 2,
"no-useless-concat": 2,
"no-void": 2,
"no-with": 2,
"radix": 1,
"wrap-iife": [2, "inside"],
"strict": 1,
"no-label-var": 2,
"no-shadow": 1,
"no-shadow-restricted-names": 2,
"no-undef-init": 2,
"no-use-before-define": [1, {"functions": false}],
"callback-return": 1,
"handle-callback-err": 1,
"no-new-require": 2,
"no-path-concat": 1,
"array-bracket-spacing": [2, "never"],
"block-spacing": [2, "always"],
"brace-style": [2, "1tbs", {"allowSingleLine": true}],
"camelcase": [2, {"properties": "never"}],
"comma-dangle": [2, "always-multiline"],
"comma-spacing": [2, {"before": false, "after": true}],
"comma-style": [2, "last"],
"computed-property-spacing": [2, "never"],
"eol-last": 1,
"func-call-spacing": [2, "never"],
"indent": [2, 4, {"SwitchCase": 1}],
"key-spacing": [2, {"beforeColon": false, "afterColon": true}],
"keyword-spacing": [2, {"before": true, "after": true}],
"linebreak-style": [2, "unix"],
"max-depth": [1, {"maximum": 5}],
"max-len": [1, {"code": 120, "ignoreUrls": true}],
"new-cap": 2,
"new-parens": 2,
"no-array-constructor": 1,
"no-bitwise": 2,
"no-lonely-if": 1,
"no-multiple-empty-lines": 2,
"no-negated-condition": 1,
"no-nested-ternary": 1,
"no-new-object": 1,
"no-restricted-syntax": [2, "WithStatement"],
"no-trailing-spaces": 2,
"no-unneeded-ternary": 2,
"no-whitespace-before-property": 2,
"object-curly-spacing": [2, "never"],
"quotes": [2, "single"],
"semi": [2, "always"],
"semi-spacing": 2,
"space-before-blocks": 2,
"space-before-function-paren": [2, {"anonymous": "always", "named": "never"}],
"space-in-parens": [2, "never"],
"space-infix-ops": 2,
"space-unary-ops": 2,
"arrow-parens": 2,
"arrow-spacing": [2, {"before": true, "after": true}],
"generator-star-spacing": [2, {"before": false, "after": true}],
"no-duplicate-imports": 2,
"no-useless-constructor": 2,
"no-var": 2,
"prefer-arrow-callback": 1,
"prefer-const": 2,
"prefer-rest-params": 2,
"prefer-spread": 2,
"require-atomic-updates": 0,
"require-yield": 1,
"template-curly-spacing": [2, "never"],
"yield-star-spacing": [2, {"before": false, "after": true}]
},
"overrides": [{
"files": ["*.ts", "*.tsx"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"strict": 0,
"no-undef": 0,
"no-dupe-class-members": 0,
"valid-jsdoc": [1, {
"requireReturnType": false,
"requireParamType": false,
"requireParamDescription": false,
"requireReturnDescription": false
}],
"semi": 0,
"@typescript-eslint/semi": 2,
"no-unused-vars": 0,
"@typescript-eslint/no-unused-vars": 2,
"no-use-before-define": 0,
"@typescript-eslint/no-use-before-define": [1, {"functions": false}],
"no-useless-constructor": 0,
"@typescript-eslint/no-useless-constructor": 2,
"@typescript-eslint/class-name-casing": 2,
"@typescript-eslint/member-delimiter-style": 2,
"@typescript-eslint/member-ordering": [2, {
"default": [
"public-static-field",
"protected-static-field",
"private-static-field",

"public-static-method",
"protected-static-method",
"private-static-method",

"public-instance-field",
"protected-instance-field",
"private-instance-field",

"constructor",

"public-instance-method",
"protected-instance-method",
"private-instance-method"
]
}],
"@typescript-eslint/explicit-member-accessibility": [2, {"accessibility": "no-public"}],
"@typescript-eslint/consistent-type-assertions": 2,
"@typescript-eslint/no-array-constructor": 2,
"@typescript-eslint/no-explicit-any": 1,
"@typescript-eslint/no-inferrable-types": 2,
"@typescript-eslint/no-namespace": 2,
"@typescript-eslint/no-non-null-assertion": 1,
"@typescript-eslint/no-parameter-properties": 2,
"@typescript-eslint/triple-slash-reference": 2,
"@typescript-eslint/prefer-namespace-keyword": 2,
"@typescript-eslint/type-annotation-spacing": [2, {
"before": true,
"after": true,
"overrides": {
"colon": {
"before": false
}
}
}]
}
}],
"settings": {
"react": {
"version": "detect"
Expand Down
Loading

0 comments on commit 7af5282

Please sign in to comment.