fix: Update config to recommended (#605)

This commit is contained in:
Nerivec
2024-11-18 20:53:35 +01:00
committed by GitHub
parent 63b969db86
commit d6ef239f56
5 changed files with 46 additions and 42 deletions

View File

@@ -1,26 +0,0 @@
{
"semi": true,
"trailingComma": "all",
"singleQuote": true,
"printWidth": 150,
"bracketSpacing": false,
"endOfLine": "lf",
"tabWidth": 4,
"importOrder": [
"",
"<TYPES>^(node:)",
"",
"<TYPES>",
"",
"<TYPES>^[.]",
"",
"<BUILTIN_MODULES>",
"",
"<THIRD_PARTY_MODULES>",
"",
"^zigbee",
"",
"^[.]"
],
"plugins": ["@ianvs/prettier-plugin-sort-imports"]
}

View File

@@ -6,12 +6,14 @@ export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
{
files: ['**/*.ts', '**/*.tsx'],
files: ['**/*.ts'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'script',
parserOptions: {
project: true,
projectService: {
allowDefaultProject: ['eslint.config.mjs', 'prettier.config.mjs'],
},
},
},
rules: {
@@ -27,7 +29,7 @@ export default tseslint.config(
},
},
{
ignores: ['tmp/', 'dist/', 'eslint.config.mjs'],
ignores: ['tmp', 'dist', 'coverage'],
},
eslintConfigPrettier,
);

28
prettier.config.mjs Normal file
View File

@@ -0,0 +1,28 @@
import sortImports from '@ianvs/prettier-plugin-sort-imports';
export default {
plugins: [sortImports],
semi: true,
trailingComma: 'all',
singleQuote: true,
printWidth: 150,
bracketSpacing: false,
endOfLine: 'lf',
tabWidth: 4,
importOrder: [
'',
'<TYPES>^(node:)',
'',
'<TYPES>',
'',
'<TYPES>^[.]',
'',
'<BUILTIN_MODULES>',
'',
'<THIRD_PARTY_MODULES>',
'',
'^zigbee',
'',
'^[.]',
],
};

View File

@@ -1,6 +1,6 @@
{
"extends": "../tsconfig",
"include": ["./**/*", "./jest.config.ts"],
"include": ["./**/*", "jest.config.ts"],
"compilerOptions": {
"types": ["jest"],
"rootDir": "..",

View File

@@ -1,20 +1,20 @@
{
"compilerOptions": {
"strict": true,
"declaration": true,
"module": "ES2022",
"moduleResolution": "node",
"target": "ES2022",
"lib": ["ES2022"],
"outDir": "dist",
"rootDir": "src",
"noUnusedLocals": true,
"outDir": "dist",
"module": "ESNext",
"moduleResolution": "node10",
"target": "ESNext",
"lib": ["ESNext"],
"esModuleInterop": true,
"noImplicitAny": true,
"noImplicitThis": true,
"composite": true
"declaration": true,
"declarationMap": true,
"strict": true,
"noUnusedLocals": true,
"composite": true,
"checkJs": true
},
"include": ["./src/**/*", "./eslint.config.mjs"],
"include": ["./src/**/*"],
"ts-node": {
"esm": true
}