Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prettier config #134

Merged
merged 2 commits into from
Apr 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120

[*.{js,ts}]
block_comment_start = /**
Expand Down
26 changes: 13 additions & 13 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ env:
browser: true
es2021: true

parser: "@typescript-eslint/parser"
parser: '@typescript-eslint/parser'
parserOptions:
ecmaVersion: 2021
sourceType: module

plugins:
- "@typescript-eslint"
- '@typescript-eslint'
- import
- wc

settings:
import/resolver:
typescript:
alwaysTryTypes: true
project: "package/*/tsconfig.json"
project: 'package/*/tsconfig.json'
wc:
elementBaseClasses:
- LitElement
Expand All @@ -45,18 +45,18 @@ rules:
new-cap:
- error
- capIsNewExceptionPattern: 'Mixin$'
"@typescript-eslint/explicit-function-return-type": error
"import/order":
'@typescript-eslint/explicit-function-return-type': error
'import/order':
- error
- groups:
- "builtin"
- "external"
- "internal"
- - "parent"
- "sibling"
- "index"
- "type"
"newlines-between": "always"
- 'builtin'
- 'external'
- 'internal'
- - 'parent'
- 'sibling'
- 'index'
- 'type'
'newlines-between': 'always'
alphabetize:
order: asc
caseInsensitive: true
Expand Down
4 changes: 4 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"bracketSpacing": false
}
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,18 @@
"cb": "npm-run-all --sequential clean build",
"s": "yarn serve:dev",
"w": "yarn watch",
"f": "yarn format",
"fl": "yarn format:eslint",
"fp": "yarn format:prettier",
"pm": "npm-run-all --sequential clean build ver-minor publish",
"pp": "npm-run-all --sequential clean build ver-patch publish",
"lint": "npm-run-all --sequential lint:*",
"lint:ts": "eslint **/*.ts",
"build": "npm-run-all --sequential build:ts && lerna run build",
"build:ts": "tsc --build",
"format": "npm-run-all --sequential format:prettier format:eslint",
"format:eslint": "eslint **/*.ts --fix",
"format:prettier": "prettier \"**/*.{html,json,md,ts}\" --ignore-path ./.eslintignore --write",
"clean": "yarn build:ts --clean && lerna exec \"rm -rf dist node_modules\" && find package -name '*.js' -type f -delete && find package -name '*.d.ts' -type f -delete && find package -name '*.map' -type f -delete",
"serve:dev": "web-dev-server --config dev-server.mjs",
"watch": "npm-run-all --parallel watch:* serve:dev",
Expand All @@ -40,6 +46,7 @@
"eslint-plugin-wc": "^1.3.2",
"lerna": "^4.0.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.6.2",
"ts-lit-plugin": "^1.2.1",
"typescript": "^4.6.3"
}
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5134,6 +5134,11 @@ prelude-ls@^1.2.1:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==

prettier@^2.6.2:
version "2.6.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.6.2.tgz#e26d71a18a74c3d0f0597f55f01fb6c06c206032"
integrity sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==

process-nextick-args@~2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
Expand Down