Prettier/ESLint Configuration Updates - #7
Merged
Merged
Conversation
…h our default rules
.vscode folder contains module snippets, settings to enforce recommended extensions and to force use of prettier as default formatter. It tells eslint to validate both javascript and typescript files. The workspace file also cleaned up
A comment line starting with /// is used to denote sections in a Sri-style module. A VSCode "Highlight Regex" is used to draw these distinctly so it's easier to see the sections.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've updated ESLint and Prettier packages. The old
.eslintrc.jsonfile has been replaced with.eslintrc.jswhich imports a separate.eslint-rules.jsfile that has our specific overrides.CHANGES
.eslintrc-rules.js..prettierignorehas been removedHOW TO FIX YOUR CODE
As you find problem files, open the PROBLEMS tab in the terminal window and see what pops up!
SRI-STYLE SECTION COMMENTS
There are "regex highlighting" expressions added to the
.code-workspaceproject file that will draw comment lines beginning with///as blue. These are used to make it easier to find code sections.To quickly get a scaffolded Sri-style module, use the command Snippets: Insert Snippet and choose
urp-module-elementsto get this: