Skip to content

Commit

Permalink
init template
Browse files Browse the repository at this point in the history
  • Loading branch information
YuriyPanasiuk committed Sep 19, 2022
1 parent 9b0338a commit 3e03797
Show file tree
Hide file tree
Showing 50 changed files with 11,130 additions and 26,461 deletions.
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/
parser/
*.css
*.svg
craco.config.ts
107 changes: 74 additions & 33 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,77 @@
{
"env": {
"browser": true,
"es2021": true,
"jest": true
"env": {
"browser": true,
"es2021": true,
"jest": true
},
"extends": [
"react-app",
"react-app/jest",
"airbnb",
"airbnb-typescript",
"plugin:import/typescript",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"extends": [
"react-app",
"react-app/jest",
"airbnb",
"airbnb-typescript",
"plugin:import/typescript",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": [
"react",
"@typescript-eslint",
"prettier"

],
"rules": {
"react/react-in-jsx-scope": ["off"],
"react/jsx-uses-react": ["off"],
"react/jsx-props-no-spreading": ["warn"],
"react/no-unescaped-entities": ["off"]
"ecmaVersion": "latest",
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": ["react", "@typescript-eslint", "prettier", "simple-import-sort"],
"rules": {
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"react/react-in-jsx-scope": ["off"],
"react/jsx-uses-react": ["off"],
"react/jsx-props-no-spreading": ["off"],
"react/no-unescaped-entities": ["off"],
"import/no-anonymous-default-export": ["off"],
"import/export": ["off"],
"import/prefer-default-export": ["off"],
"react/require-default-props": ["off"],
"react/prop-types": ["off"],
"react/function-component-definition": [
2,
{
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
}
]
},
"overrides": [
{
"files": ["**/*.js", "**/*.ts", "**/*.tsx"],
"rules": {
"simple-import-sort/imports": [
"error",
{
"groups": [
// `react` first,
["^react"],
//then packages starting with a character
["^[a-z]"],
// Packages starting with `@`
["^@core"],
// Packages starting with `@`
["^@"],
// Packages starting with `~`
["^~"],
// Imports starting with `../`
["^\\.\\.(?!/?$)", "^\\.\\./?$"],
// Imports starting with `./`
["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
// Style imports
["^.+\\.s?css$|^@+\\.s?css$"],
// Side effect imports
["^\\u0000"]
]
}
]
}
}
}
]
}
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "yarn"
directory: "/"
schedule:
interval: "weekly"
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
yarn lint-staged
4 changes: 2 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"trailingComma": "all",
"printWidth": 80,
"useTabs": false,
"endOfLine":"auto"
}
"endOfLine": "auto"
}
16 changes: 16 additions & 0 deletions craco.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const CracoAlias = require("craco-alias");

module.exports = {
plugins: [
{
plugin: CracoAlias,
options: {
source: "tsconfig",
baseUrl: ".",
tsConfigPath: "./tsconfig.path.json",
},
},
],
};

export {};
Loading

0 comments on commit 3e03797

Please sign in to comment.