Skip to content

Commit

Permalink
prettier and lint setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Akilon Krishnan committed Oct 12, 2023
1 parent 68f5d0c commit efb684d
Show file tree
Hide file tree
Showing 42 changed files with 35,565 additions and 35,668 deletions.
1 change: 1 addition & 0 deletions js/bbreact/public/app/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
82 changes: 38 additions & 44 deletions js/bbreact/public/app/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,39 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
// "standard-with-typescript",
// "plugin:react/recommended",
"react-app"
],
"parser": "@typescript-eslint/parser",
// "parserOptions": {
// "ecmaVersion": "latest",
// "sourceType": "module",
// "project": "./tsconfig.eslint.json",
// "tsconfigRootDir": "./",
// "ecmaFeatures": {
// "jsx": true
// }
// },
"plugins": [
"react"
],
"rules": {},
"settings": {
"react": {
"version": "detect"
}
},
"ignorePatterns": [
"node_modules/",
"build/"
],
"overrides": [
{
"files": [
"**/*.ts",
"**/*.tsx"
],
"rules": {
// ... rules specific to JavaScript and TypeScript files
}
}
]
}
"env": {
"browser": true,
"es2021": true
},
"extends": [
"standard-with-typescript",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"react-app",
"react-app/jest"
],
"rules": {
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/consistent-type-definitions": ["error", "type"]
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["react", "@typescript-eslint"],
"settings": {
"react": {
"version": "detect"
}
},
"ignorePatterns": ["node_modules/", "build/"],
"overrides": [
{
"files": ["**/*.ts", "**/*.tsx"],
"rules": {
// ... rules specific to JavaScript and TypeScript files
}
}
]
}
18 changes: 18 additions & 0 deletions js/bbreact/public/app/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"semi": true,
"singleQuote": false,
"arrowParens": "avoid",
"printWidth": 100,
"tabWidth": 4,
"trailingComma": "es5",
"useTabs": true,
"overrides": [
{
"files": "*.yml",
"options": {
"useTabs": false,
"tabWidth": 2
}
}
]
}
28 changes: 14 additions & 14 deletions js/bbreact/public/app/craco.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
const path = require("path");
module.exports = {
webpack: {
alias: {
"@hooks": path.resolve(__dirname, "src/hooks"),
"@config": path.resolve(__dirname, "src/config"),
"@core": path.resolve(__dirname, "src/shared/core"),
"@modules": path.resolve(__dirname, "src/modules"),
"@infra": path.resolve(__dirname, "src/shared/infra"),
"@layout": path.resolve(__dirname, "src/shared/layout"),
"@component": path.resolve(__dirname, "src/shared/components"),
"@utils": path.resolve(__dirname, "src/shared/utils"),
"@pages": path.resolve(__dirname, "src/pages"),
"@routes": path.resolve(__dirname, "src/routes"),
},
},
webpack: {
alias: {
"@hooks": path.resolve(__dirname, "src/hooks"),
"@config": path.resolve(__dirname, "src/config"),
"@core": path.resolve(__dirname, "src/shared/core"),
"@modules": path.resolve(__dirname, "src/modules"),
"@infra": path.resolve(__dirname, "src/shared/infra"),
"@layout": path.resolve(__dirname, "src/shared/layout"),
"@component": path.resolve(__dirname, "src/shared/components"),
"@utils": path.resolve(__dirname, "src/shared/utils"),
"@pages": path.resolve(__dirname, "src/pages"),
"@routes": path.resolve(__dirname, "src/routes"),
},
},
};
Loading

0 comments on commit efb684d

Please sign in to comment.