Skip to content

Commit

Permalink
Update eslint/prettier config
Browse files Browse the repository at this point in the history
  • Loading branch information
Thodor12 committed Dec 5, 2024
1 parent dd96523 commit dd7bcd9
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 88 deletions.
6 changes: 5 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
dist
.astro
.vscode
chart
dist
minecolonies
node_modules
public
pnpm-lock.yaml
12 changes: 5 additions & 7 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
// @ts-check
import path from 'path';
import { fileURLToPath } from 'url';

import js from '@eslint/js';
import ts from 'typescript-eslint';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import eslintPluginAstro from 'eslint-plugin-astro';

import simpleImportSort from 'eslint-plugin-simple-import-sort';
import typescriptPlugin from '@typescript-eslint/eslint-plugin';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

export default ts.config(
js.configs.recommended,
eslintPluginPrettierRecommended,
ts.configs.eslintRecommended,
...ts.configs.strict,
...eslintPluginAstro.configs.recommended,
eslintPluginPrettierRecommended,
{
name: 'Ignore patterns',
ignores: ['.astro', '.vscode', 'dist', 'minecolonies', 'node_modules', 'public']
ignores: ['.astro', '.vscode', 'chart', 'dist', 'minecolonies', 'node_modules', 'public', 'pnpm-lock.yaml']
},
{
name: 'Application rules (Astro)',
files: ['**/*.astro'],
plugins: {
'@typescript-eslint': typescriptPlugin,
'@typescript-eslint': ts.plugin,
'simple-import-sort': simpleImportSort
},
rules: {
Expand All @@ -52,7 +50,7 @@ export default ts.config(
}
},
plugins: {
'@typescript-eslint': typescriptPlugin,
'@typescript-eslint': ts.plugin,
'simple-import-sort': simpleImportSort
},
rules: {
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,18 @@
"@types/eslint__eslintrc": "^2.1.1",
"@types/eslint__js": "^8.42.3",
"@types/shelljs": "^0.8.15",
"@typescript-eslint/parser": "8.0.0-alpha.34",
"eslint": "^9.5.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-astro": "^1.2.2",
"eslint-plugin-markdownlint": "^0.6.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-simple-import-sort": "^12.1.0",
"npm-check-updates": "^16.14.20",
"prettier": "^3.3.2",
"prettier-plugin-astro": "^0.14.0",
"sass": "^1.77.6",
"shelljs": "^0.8.5",
"typescript": "^5.5.2",
"typescript-eslint": "8.0.0-alpha.34"
"typescript-eslint": "8.17.0"
}
}
Loading

0 comments on commit dd7bcd9

Please sign in to comment.