Skip to content

Commit

Permalink
fix: Update config to recommended (#605)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerivec authored Nov 18, 2024
1 parent 63b969d commit d6ef239
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 42 deletions.
26 changes: 0 additions & 26 deletions .prettierrc

This file was deleted.

8 changes: 5 additions & 3 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -27,7 +29,7 @@ export default tseslint.config(
},
},
{
ignores: ['tmp/', 'dist/', 'eslint.config.mjs'],
ignores: ['tmp', 'dist', 'coverage'],
},
eslintConfigPrettier,
);
28 changes: 28 additions & 0 deletions prettier.config.mjs
Original file line number Diff line number Diff line change
@@ -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',
'',
'^[.]',
],
};
2 changes: 1 addition & 1 deletion tests/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "../tsconfig",
"include": ["./**/*", "./jest.config.ts"],
"include": ["./**/*", "jest.config.ts"],
"compilerOptions": {
"types": ["jest"],
"rootDir": "..",
Expand Down
24 changes: 12 additions & 12 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -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
}
Expand Down

0 comments on commit d6ef239

Please sign in to comment.