Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update config to recommended #605

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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