generated from Kentico/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(Importer): client eslint integration
- Loading branch information
1 parent
598361e
commit ad4a0ee
Showing
13 changed files
with
4,968 additions
and
410 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
webpack.config.js |
163 changes: 163 additions & 0 deletions
163
src/Kentico.Xperience.Contacts.Importer/Client/.eslintrc.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true | ||
}, | ||
"extends": [ | ||
"plugin:react/recommended", | ||
"standard-with-typescript", | ||
"prettier" | ||
], | ||
"overrides": [], | ||
"parserOptions": { | ||
"project": "./tsconfig.json", | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["react"], | ||
"rules": { | ||
"@typescript-eslint/no-invalid-void-type": ["off"], | ||
"quotes": [ | ||
"error", | ||
"single", | ||
{ | ||
"avoidEscape": true | ||
} | ||
], | ||
"jsx-quotes": ["error", "prefer-double"], | ||
"eqeqeq": ["error", "always"], | ||
"no-var": "error", | ||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
"argsIgnorePattern": "^_", | ||
"varsIgnorePattern": "^_", | ||
"caughtErrorsIgnorePattern": "^_", | ||
"args": "after-used" | ||
} | ||
], | ||
"no-console": ["error", { "allow": ["warn", "error"] }], | ||
"no-debugger": "error", | ||
"import/first": "error", | ||
"sort-imports": ["error", { "ignoreDeclarationSort": true }], | ||
"import/order": [ | ||
"error", | ||
{ | ||
"newlines-between": "never", | ||
"pathGroups": [ | ||
{ | ||
"pattern": "./**.scss", | ||
"group": "index", | ||
"position": "after" | ||
} | ||
], | ||
"groups": [ | ||
"builtin", | ||
"external", | ||
"internal", | ||
"parent", | ||
"sibling", | ||
"index" | ||
], | ||
"alphabetize": { | ||
"order": "asc", | ||
"caseInsensitive": true | ||
} | ||
} | ||
], | ||
"import/no-default-export": "error", | ||
"import/no-duplicates": "error", | ||
"react/prefer-es6-class": ["error", "always"], | ||
"react/jsx-uses-react": "off", | ||
"react/react-in-jsx-scope": "off", | ||
"@typescript-eslint/no-explicit-any": "error", | ||
"@typescript-eslint/no-require-imports": "error", | ||
"@typescript-eslint/naming-convention": [ | ||
"error", | ||
{ | ||
"selector": "default", | ||
"format": ["PascalCase"], | ||
"filter": { | ||
"regex": "^((data|aria|xp|invalid|--[a-z]+)[-].+)|[0-9]+$", | ||
"match": false | ||
} | ||
}, | ||
{ | ||
"selector": "variable", | ||
"format": ["PascalCase", "camelCase"] | ||
}, | ||
{ | ||
"selector": "variable", | ||
"format": ["UPPER_CASE"], | ||
"filter": { | ||
"regex": "^__[A-Za-z_]+__$", | ||
"match": true | ||
}, | ||
"leadingUnderscore": "requireDouble", | ||
"trailingUnderscore": "requireDouble" | ||
}, | ||
{ | ||
"selector": "function", | ||
"format": ["camelCase"] | ||
}, | ||
{ | ||
"selector": "parameter", | ||
"format": ["camelCase"], | ||
"leadingUnderscore": "allow" | ||
}, | ||
{ | ||
"selector": "enum", | ||
"format": ["PascalCase"] | ||
}, | ||
{ | ||
"selector": "objectLiteralProperty", | ||
"format": ["camelCase", "PascalCase"], | ||
"filter": { | ||
"regex": "^((data|aria|xp|invalid|--[a-z]+)[-].+)|[0-9]+$", | ||
"match": false | ||
} | ||
}, | ||
{ | ||
"selector": "objectLiteralMethod", | ||
"format": ["camelCase"] | ||
}, | ||
{ | ||
"selector": "typeProperty", | ||
"format": ["camelCase"], | ||
"filter": { | ||
"regex": "^(data)[-].+$", | ||
"match": false | ||
} | ||
}, | ||
{ | ||
"selector": "typeLike", | ||
"format": ["PascalCase"] | ||
}, | ||
{ | ||
"selector": "classMethod", | ||
"format": ["camelCase"] | ||
}, | ||
{ | ||
"selector": "classProperty", | ||
"format": ["camelCase"] | ||
}, | ||
{ | ||
"selector": "interface", | ||
"format": ["PascalCase"], | ||
"custom": { | ||
"regex": "^I[A-Z]", | ||
"match": false | ||
} | ||
} | ||
], | ||
"@typescript-eslint/await-thenable": "warn", | ||
"@typescript-eslint/prefer-enum-initializers": "error", | ||
"@typescript-eslint/no-non-null-assertion": "error" | ||
}, | ||
"settings": { | ||
"react": { | ||
"version": "18.2.0" | ||
} | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
src/Kentico.Xperience.Contacts.Importer/Client/.prettierrc.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"arrowParens": "always", | ||
"singleQuote": true, | ||
"semi": true | ||
} |
47 changes: 23 additions & 24 deletions
47
src/Kentico.Xperience.Contacts.Importer/Client/babel.config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,27 @@ | ||
{ | ||
"presets": [ | ||
"@babel/preset-env", | ||
"@babel/preset-react", | ||
"@babel/preset-typescript" | ||
], | ||
"plugins": [ | ||
[ | ||
"@babel/plugin-transform-runtime", | ||
{ | ||
"useESModules": true | ||
} | ||
] | ||
], | ||
"env": { | ||
"test": { | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"targets": "current node" | ||
} | ||
] | ||
] | ||
"presets": [ | ||
"@babel/preset-env", | ||
"@babel/preset-react", | ||
"@babel/preset-typescript" | ||
], | ||
"plugins": [ | ||
[ | ||
"@babel/plugin-transform-runtime", | ||
{ | ||
"useESModules": true | ||
} | ||
] | ||
], | ||
"env": { | ||
"test": { | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"targets": "current node" | ||
} | ||
] | ||
] | ||
} | ||
} | ||
} |
Oops, something went wrong.