mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 07:38:10 +00:00
Project Initialization
This commit is contained in:
44
packages/config/eslint-config/base.js
Normal file
44
packages/config/eslint-config/base.js
Normal file
@@ -0,0 +1,44 @@
|
||||
/** @type {import('eslint').Linter.Config} */
|
||||
module.exports = {
|
||||
root: true,
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
ecmaVersion: 2022,
|
||||
sourceType: 'module',
|
||||
},
|
||||
plugins: ['@typescript-eslint', 'import'],
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:import/recommended',
|
||||
'plugin:import/typescript',
|
||||
'prettier',
|
||||
],
|
||||
rules: {
|
||||
'@typescript-eslint/no-unused-vars': [
|
||||
'warn',
|
||||
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
|
||||
],
|
||||
'@typescript-eslint/no-explicit-any': 'warn',
|
||||
'import/order': [
|
||||
'warn',
|
||||
{
|
||||
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
|
||||
'newlines-between': 'always',
|
||||
alphabetize: { order: 'asc' },
|
||||
},
|
||||
],
|
||||
'no-console': ['warn', { allow: ['warn', 'error'] }],
|
||||
},
|
||||
settings: {
|
||||
'import/resolver': {
|
||||
typescript: true,
|
||||
node: true,
|
||||
},
|
||||
},
|
||||
env: {
|
||||
node: true,
|
||||
es2022: true,
|
||||
},
|
||||
ignorePatterns: ['dist', 'build', '.turbo', 'node_modules', 'coverage'],
|
||||
};
|
||||
13
packages/config/eslint-config/nestjs.js
Normal file
13
packages/config/eslint-config/nestjs.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/** @type {import('eslint').Linter.Config} */
|
||||
module.exports = {
|
||||
extends: ['./base.js'],
|
||||
env: {
|
||||
node: true,
|
||||
jest: true,
|
||||
},
|
||||
rules: {
|
||||
'@typescript-eslint/interface-name-prefix': 'off',
|
||||
'@typescript-eslint/explicit-function-return-type': 'off',
|
||||
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
||||
},
|
||||
};
|
||||
17
packages/config/eslint-config/package.json
Normal file
17
packages/config/eslint-config/package.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "@edr/eslint-config",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"main": "base.js",
|
||||
"files": ["base.js", "nestjs.js", "react.js"],
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^8.8.0",
|
||||
"@typescript-eslint/parser": "^8.8.0",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-import": "^2.31.0",
|
||||
"eslint-plugin-react": "^7.37.1",
|
||||
"eslint-plugin-react-hooks": "^4.6.2",
|
||||
"eslint-plugin-react-refresh": "^0.4.12"
|
||||
}
|
||||
}
|
||||
20
packages/config/eslint-config/react.js
vendored
Normal file
20
packages/config/eslint-config/react.js
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
/** @type {import('eslint').Linter.Config} */
|
||||
module.exports = {
|
||||
extends: [
|
||||
'./base.js',
|
||||
'plugin:react/recommended',
|
||||
'plugin:react/jsx-runtime',
|
||||
'plugin:react-hooks/recommended',
|
||||
],
|
||||
plugins: ['react-refresh'],
|
||||
env: {
|
||||
browser: true,
|
||||
},
|
||||
settings: {
|
||||
react: { version: 'detect' },
|
||||
},
|
||||
rules: {
|
||||
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
|
||||
'react/prop-types': 'off',
|
||||
},
|
||||
};
|
||||
10
packages/config/prettier-config/index.js
Normal file
10
packages/config/prettier-config/index.js
Normal file
@@ -0,0 +1,10 @@
|
||||
/** @type {import('prettier').Config} */
|
||||
module.exports = {
|
||||
semi: true,
|
||||
singleQuote: true,
|
||||
trailingComma: 'all',
|
||||
printWidth: 100,
|
||||
tabWidth: 2,
|
||||
arrowParens: 'always',
|
||||
endOfLine: 'lf',
|
||||
};
|
||||
6
packages/config/prettier-config/package.json
Normal file
6
packages/config/prettier-config/package.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "@edr/prettier-config",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"main": "index.js"
|
||||
}
|
||||
24
packages/config/tsconfig/base.json
Normal file
24
packages/config/tsconfig/base.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"lib": ["ES2022"],
|
||||
"strict": true,
|
||||
"noImplicitAny": true,
|
||||
"strictNullChecks": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noImplicitReturns": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"sourceMap": true
|
||||
}
|
||||
}
|
||||
16
packages/config/tsconfig/nestjs.json
Normal file
16
packages/config/tsconfig/nestjs.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"extends": "./base.json",
|
||||
"compilerOptions": {
|
||||
"module": "CommonJS",
|
||||
"moduleResolution": "Node",
|
||||
"target": "ES2022",
|
||||
"lib": ["ES2022"],
|
||||
"experimentalDecorators": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"useDefineForClassFields": false,
|
||||
"isolatedModules": false,
|
||||
"incremental": true,
|
||||
"removeComments": true
|
||||
}
|
||||
}
|
||||
6
packages/config/tsconfig/package.json
Normal file
6
packages/config/tsconfig/package.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "@edr/tsconfig",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"files": ["base.json", "nestjs.json", "react.json"]
|
||||
}
|
||||
14
packages/config/tsconfig/react.json
Normal file
14
packages/config/tsconfig/react.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"extends": "./base.json",
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
||||
"jsx": "react-jsx",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"noEmit": true,
|
||||
"useDefineForClassFields": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user