Skip to content

Commit

Permalink
fix(prettier): json
Browse files Browse the repository at this point in the history
  • Loading branch information
nnecec committed Jan 17, 2024
1 parent 731aee2 commit 1b26178
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 66 deletions.
2 changes: 1 addition & 1 deletion fixtures/lint-project/c.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export function App() {
return (
<div className="h-2 w-2 p-2 text-3xl text-red-500">
<div className="size-2 p-2 text-3xl text-red-500">
For readability we recommend against using more than 80 characters: In code styleguides, maximum line length rules
are often set to 100 or 120. However, when humans write code, they don’t strive to reach the maximum number of
columns on every line. Developers often use whitespace to break up long lines for readability. In practice, the
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Wed, 29 Nov 2023 02:44:29 GMT

### Patches

- fix(eslint): ignore postcss.config.* ([email protected])
- fix(eslint): ignore postcss.config.\* ([email protected])

## 0.8.0

Expand Down
1 change: 1 addition & 0 deletions packages/eslint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-html": "^7.1.0",
"eslint-plugin-i": "^2.29.1",
"eslint-plugin-jest": "^27.6.3",
Expand Down
15 changes: 2 additions & 13 deletions packages/eslint/src/configs/prettier.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
import type { Linter } from 'eslint'

import { pluginPrettier } from '../externals'
import PrettierRecommended from 'eslint-plugin-prettier/recommended'

export const prettier = (): Linter.FlatConfig[] => {
return [
{
plugins: {
prettier: pluginPrettier,
},
rules: {
'arrow-body-style': 'off',
'prefer-arrow-callback': 'off',
'prettier/prettier': 'error',
},
},
]
return [PrettierRecommended]
}
10 changes: 10 additions & 0 deletions packages/prettier/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,21 @@ module.exports = {
proseWrap: 'never',
},
},
{
files: ['*.json', '*.json5', '*.jsonc'],
options: {
parser: 'json5',
quoteProps: 'preserve',
singleQuote: false,
trailingComma: 'none',
},
},
],
printWidth: 100,
proseWrap: 'always',
quoteProps: 'as-needed',
semi: false,
singleQuote: true,
tabWidth: 2,
trailingComma: 'all',
}
4 changes: 2 additions & 2 deletions packages/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"vite-tsconfig-paths": "^4.3.1"
},
"devDependencies": {
"bunchee": "^4.4.0",
"@types/node": "^20.11.5"
"@types/node": "^20.11.5",
"bunchee": "^4.4.0"
},
"publishConfig": {
"access": "public"
Expand Down
69 changes: 20 additions & 49 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1b26178

Please sign in to comment.