Skip to content

Commit

Permalink
feat!: change to esm (#295)
Browse files Browse the repository at this point in the history
  • Loading branch information
ykzts committed Mar 11, 2024
1 parent 6716579 commit c5ca43f
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 21 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ jobs:
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm format-check
- run: pnpm fetch-schema && pnpm migrate-schema && pnpm validate
5 changes: 5 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { type Config } from 'prettier'

declare const prettierConfig: Config

export default prettierConfig
16 changes: 16 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/** @type {import("prettier").Config} */
const prettierConfig = {
arrowParens: 'always',
bracketSameLine: false,
bracketSpacing: true,
endOfLine: 'lf',
jsxSingleQuote: false,
quoteProps: 'as-needed',
semi: false,
singleQuote: true,
tabWidth: 2,
trailingComma: 'none',
useTabs: false
}

export default prettierConfig
14 changes: 0 additions & 14 deletions index.json

This file was deleted.

11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,23 @@
},
"homepage": "https://github.com/inabagumi/prettier-config",
"license": "MIT",
"main": "index.json",
"main": "index.js",
"name": "@inabagumi/prettier-config",
"packageManager": "pnpm@8.15.4",
"peerDependencies": {
"prettier": ">= 2.4.0"
},
"prettier": "./index.json",
"prettier": "./index.js",
"repository": {
"type": "git",
"url": "git+https://github.com/inabagumi/prettier-config.git"
},
"scripts": {
"fetch-schema": "curl -sSL https://json.schemastore.org/prettierrc > legacy-schema.json",
"format": "prettier --write .",
"format-check": "prettier --check .",
"migrate-schema": "ajv migrate --spec=draft7 -o schema.json -s legacy-schema.json",
"release": "standard-version",
"validate": "ajv validate -d index.json -s schema.json"
"release": "standard-version"
},
"type": "module",
"types": "index.d.ts",
"version": "2.0.2"
}

0 comments on commit c5ca43f

Please sign in to comment.