mirror of
https://github.com/Koenkk/zigbee-OTA.git
synced 2026-06-24 12:26:24 +00:00
fix: Update config to recommended (#605)
This commit is contained in:
26
.prettierrc
26
.prettierrc
@@ -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"]
|
||||
}
|
||||
@@ -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
28
prettier.config.mjs
Normal 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',
|
||||
'',
|
||||
'^[.]',
|
||||
],
|
||||
};
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"extends": "../tsconfig",
|
||||
"include": ["./**/*", "./jest.config.ts"],
|
||||
"include": ["./**/*", "jest.config.ts"],
|
||||
"compilerOptions": {
|
||||
"types": ["jest"],
|
||||
"rootDir": "..",
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user