Skip to content

Fix inconsistencies between local and remote formatters - #634

Merged
0x2b3bfa0 merged 4 commits into
masterfrom
fix-linter-issues
Jun 30, 2021
Merged

0x2b3bfa0 merged 4 commits into
masterfrom
fix-linter-issues

Conversation

@0x2b3bfa0

Copy link
Copy Markdown
Member

Local formattter configuration

We use husky to configure pre-commit hooks so files are automatically linted and formatted with lint-staged on each commit. Unfortunately, prettier is not being used for files with the js extension due to a misconfiguration.

cml/package.json

Lines 47 to 51 in 1ed743d

"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},

cml/package.json

Lines 52 to 59 in 1ed743d

"lint-staged": {
"*.js": [
"eslint --fix"
],
"*.{md,yaml,yml}": [
"prettier --write"
]
},

Remote formattter configuration

Here we use prettier for all the extensions above plus the js and json ones. That's the issue behind #623 and company.

cml/.restyled.yaml

Lines 1 to 8 in 1ed743d

restylers:
- name: prettier
arguments: ['--write']
include:
- 'src/**/*.js'
- 'bin/**/*.js'
- 'assets/*.json'
- './**/*.{yaml,yml,md,json}'

Reorder file extension list on restyled.yml

Update .restyled.yaml
@0x2b3bfa0 0x2b3bfa0 added bug Something isn't working technical-debt Refactoring, linting & tidying testing Unit tests & debugging labels Jun 30, 2021
@0x2b3bfa0 0x2b3bfa0 self-assigned this Jun 30, 2021
@0x2b3bfa0
0x2b3bfa0 temporarily deployed to internal June 30, 2021 19:58 Inactive
@0x2b3bfa0 0x2b3bfa0 removed the bug Something isn't working label Jun 30, 2021
@casperdcl
casperdcl temporarily deployed to internal June 30, 2021 21:18 Inactive
@0x2b3bfa0
0x2b3bfa0 temporarily deployed to internal June 30, 2021 22:44 Inactive
@0x2b3bfa0
0x2b3bfa0 force-pushed the fix-linter-issues branch from 623b0d0 to c815b0b Compare June 30, 2021 22:58
@0x2b3bfa0
0x2b3bfa0 temporarily deployed to internal June 30, 2021 22:58 Inactive
@0x2b3bfa0 0x2b3bfa0 linked an issue Jun 30, 2021 that may be closed by this pull request
@0x2b3bfa0
0x2b3bfa0 merged commit 71bed37 into master Jun 30, 2021
@0x2b3bfa0
0x2b3bfa0 deleted the fix-linter-issues branch June 30, 2021 23:05

This branch was previously deployed

1 inactive deployment
internal — c815b0bf Deployed Jun 30, 2021 by 0x2b3bfa0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

technical-debt Refactoring, linting & tidying testing Unit tests & debugging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix/upgrade integration tests

2 participants