Skip to content

Commit

Permalink
Merge pull request #79 from personalizedrefrigerator/prettier
Browse files Browse the repository at this point in the history
chore: Format codebase with prettier
  • Loading branch information
personalizedrefrigerator authored Nov 3, 2024
2 parents 7b688d6 + 3978b53 commit caa195b
Show file tree
Hide file tree
Showing 470 changed files with 11,929 additions and 9,565 deletions.
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# See https://editorconfig.org/

root = true

[*.{js,json,ts,html,py}]
indent_style = tab
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{md,yml}]
end_of_line = lf

69 changes: 22 additions & 47 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,57 +1,32 @@
module.exports = {
'env': {
'browser': true,
'es2021': true,
'node': true
env: {
browser: true,
es2021: true,
node: true,
},
'extends': [
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'eslint-config-prettier',
],
// See https://typescript-eslint.io/linting/troubleshooting/#i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file
'overrides': [
overrides: [
{
'extends': ['plugin:@typescript-eslint/disable-type-checked'],
'files': ['./**/*.js'],
extends: ['plugin:@typescript-eslint/disable-type-checked'],
files: ['./**/*.js'],
},
],
'parser': '@typescript-eslint/parser',
'parserOptions': {
'ecmaVersion': 'latest',
'sourceType': 'module',
'project': './tsconfig.eslint.json',
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: './tsconfig.eslint.json',
},
'plugins': [
'@typescript-eslint'
],
'rules': {
// Deprecated and removed:
// TODO: Replace
// '@typescript-eslint/indent': [
// 'error',
// 'tab',
// {
// 'ignoredNodes': [
// // See https://github.com/typescript-eslint/typescript-eslint/issues/1824
// 'TSUnionType',
// ]
// }
// ],
'linebreak-style': [
'error',
'unix'
],
'quotes': [
'error',
'single'
],
'semi': [
'error',
'always'
],
plugins: ['@typescript-eslint'],
rules: {
'linebreak-style': ['error', 'unix'],
'no-constant-binary-expression': 'error',
'no-trailing-spaces': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-empty-interface': 'off',
Expand All @@ -71,7 +46,7 @@ module.exports = {

// Ideally, this should be closer to 20. However, several blocks of old
// code prevent this.
'complexity': ['error', 40],
complexity: ['error', 40],

// A subset of the default recommended-type-checked rules.
// See https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/recommended-type-checked.ts
Expand Down Expand Up @@ -103,22 +78,22 @@ module.exports = {
'@typescript-eslint/unbound-method': [
'error',
{
'ignoreStatic': true
ignoreStatic: true,
},
],

'@typescript-eslint/no-unused-vars': [
'error',
{
'argsIgnorePattern': '^_',
}
argsIgnorePattern: '^_',
},
],
'@typescript-eslint/no-explicit-any': 'off',

// namespaces can be useful when defining helper methods for interfaces.
'@typescript-eslint/no-namespace': 'off',
},
'ignorePatterns': [
ignorePatterns: [
'**/*.bundle.js',
'**/dist/',
'docs/typedoc/',
Expand Down
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Formatted codebase with prettier
b1312c21ae7a8bcce3a34e21bab68e2bb34f4a83
50 changes: 25 additions & 25 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "Bug report"
description: "Report an issue with js-draw."
title: "Bug: "
name: 'Bug report'
description: 'Report an issue with js-draw.'
title: 'Bug: '
labels: [bug]
assignees: []
body:
Expand All @@ -11,55 +11,55 @@ body:
- type: textarea
id: issue-description
attributes:
label: "Describe the issue"
description: "This should be a short and simple description of the issue."
placeholder: "A clear and concise description of the issue."
label: 'Describe the issue'
description: 'This should be a short and simple description of the issue.'
placeholder: 'A clear and concise description of the issue.'
validations:
required: true
- type: textarea
id: reproduction-steps
attributes:
label: "Steps to reproduce the issue"
description: "If possible, provide a list of steps to reproduce the issue."
label: 'Steps to reproduce the issue'
description: 'If possible, provide a list of steps to reproduce the issue.'
value: |
1. Open ...
2. Switch to the ... tool.
3. ...
placeholder: "Reproduction steps"
placeholder: 'Reproduction steps'
- type: textarea
id: expected-behavior
attributes:
label: "Expected behavior"
description: "What should have happened?"
placeholder: "A concise description of what was expected to happen."
label: 'Expected behavior'
description: 'What should have happened?'
placeholder: 'A concise description of what was expected to happen.'
- type: textarea
id: observed-behavior
attributes:
label: "Observed behavior"
description: "What happened?"
placeholder: "A concise description of what happened."
label: 'Observed behavior'
description: 'What happened?'
placeholder: 'A concise description of what happened.'
- type: input
id: version
attributes:
label: "Version information"
description: "What version of js-draw were you using?"
placeholder: "version (e.g. 1.7.0, 0.20.5, or unknown)"
label: 'Version information'
description: 'What version of js-draw were you using?'
placeholder: 'version (e.g. 1.7.0, 0.20.5, or unknown)'
validations:
required: true
- type: textarea
id: platform
attributes:
label: "Platform"
description: "What browsers/environments did you test with? (For example, `Chrome 120.0.1234.56`, `Joplin Mobile 12.3`, or `Firefox 113.1`)"
label: 'Platform'
description: 'What browsers/environments did you test with? (For example, `Chrome 120.0.1234.56`, `Joplin Mobile 12.3`, or `Firefox 113.1`)'
- type: textarea
id: logs
attributes:
label: "Logs"
description: "If appropriate, [it may be helpful to create and attach an input log](https://js-draw.web.app/debugging/stroke-logging/)."
placeholder: "Input log"
label: 'Logs'
description: 'If appropriate, [it may be helpful to create and attach an input log](https://js-draw.web.app/debugging/stroke-logging/).'
placeholder: 'Input log'
render: shell
- type: textarea
id: additional-info
attributes:
label: "Additional information"
description: "Any additional context or information (e.g. screenshots)."
label: 'Additional information'
description: 'Any additional context or information (e.g. screenshots).'
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
Expand Down
Loading

0 comments on commit caa195b

Please sign in to comment.