Skip to content

Commit

Permalink
Merge pull request #39 from schlawg/prettier
Browse files Browse the repository at this point in the history
use prettier for typescript again
  • Loading branch information
ornicar authored Sep 29, 2024
2 parents 3842c3f + 424bdc0 commit 7a0cd7b
Show file tree
Hide file tree
Showing 11 changed files with 1,298 additions and 555 deletions.
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
*.ts
22 changes: 1 addition & 21 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,33 +1,13 @@
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import stylisticEslint from '@stylistic/eslint-plugin';
import tsParser from '@typescript-eslint/parser';

export default [
{
files: ['**/*.ts'],
ignores: ['**/dist/**', '**/node_modules/**', '**/public/**'],
plugins: { '@typescript-eslint': typescriptEslint, '@stylistic': stylisticEslint },
plugins: { '@typescript-eslint': typescriptEslint },
languageOptions: { parser: tsParser, ecmaVersion: 5, sourceType: 'module' },
rules: {
'@stylistic/indent': ['error', 2],
'@stylistic/quotes': ['error', 'single', { avoidEscape: true, allowTemplateLiterals: true }],
'@stylistic/semi': ['error', 'always'],
'@stylistic/comma-dangle': ['error', 'always-multiline'],
'@stylistic/object-curly-spacing': ['error', 'always'],
'@stylistic/space-before-function-paren': ['error', 'never'],
'@stylistic/no-trailing-spaces': 'error',
'@stylistic/max-len': [
'warn',
{
code: 110,
ignoreUrls: true,
ignoreStrings: true,
ignoreComments: true,
ignoreRegExpLiterals: true,
ignoreTemplateLiterals: true,
},
],

'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-empty-function': 'off',
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"snabbdom": "^3.6.2"
},
"devDependencies": {
"@stylistic/eslint-plugin": "^2.8.0",
"@typescript-eslint/eslint-plugin": "^8.7.0",
"@typescript-eslint/parser": "^8.7.0",
"esbuild": "^0.19.12",
Expand All @@ -49,7 +48,7 @@
},
"scripts": {
"compile": "tsc --incremental",
"format": "prettier --write --log-level warn . && eslint --fix src",
"format": "prettier --write --log-level warn .",
"bundle": "esbuild src/main.ts --bundle --format=esm --platform=browser",
"bundle-dev": "pnpm run bundle --outfile=demo/lichess-pgn-viewer.js",
"bundle-prod": "pnpm run bundle --minify --outfile=dist/lichess-pgn-viewer.min.js",
Expand All @@ -68,5 +67,5 @@
"scss/*",
"src/**/*"
],
"packageManager": "pnpm@9.9.0+sha512.60c18acd138bff695d339be6ad13f7e936eea6745660d4cc4a776d5247c540d0edee1a563695c183a66eb917ef88f2b4feb1fc25f32a7adcadc7aaf3438e99c1"
"packageManager": "pnpm@9.11.0+sha512.0a203ffaed5a3f63242cd064c8fb5892366c103e328079318f78062f24ea8c9d50bc6a47aa3567cabefd824d170e78fa2745ed1f16b132e16436146b7688f19b"
}
Loading

0 comments on commit 7a0cd7b

Please sign in to comment.