Skip to content

Commit

Permalink
fix: use es module for config format
Browse files Browse the repository at this point in the history
  • Loading branch information
limonte committed Aug 1, 2024
1 parent 75aa7d1 commit 7c4c074
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 23 deletions.
22 changes: 0 additions & 22 deletions index.js

This file was deleted.

27 changes: 27 additions & 0 deletions index.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import eslint from '@eslint/js'
import tseslint from 'typescript-eslint'
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
eslintPluginPrettierRecommended,
{
files: ['**/*.js', '**/*.ts'],
rules: {
'@typescript-eslint/consistent-type-imports': [
'error',
{ prefer: 'type-imports' },
],
'no-console': [
'error',
{ allow: ['warn', 'error', 'info'] },
],
'prefer-template': 'error',
'sort-imports': [
'error',
{ ignoreDeclarationSort: true },
],
},
}
)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"author": "Limon Monte (https://limonte.github.io)",
"license": "MIT",
"files": [
"index.js"
"index.mjs"
],
"peerDependencies": {
"eslint": "^9.0.0"
Expand Down

0 comments on commit 7c4c074

Please sign in to comment.