-
Notifications
You must be signed in to change notification settings - Fork 138
SNOW-2112371 Add prettier and format the repo #1073
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
Draft
sfc-gh-rsavenok
wants to merge
7
commits into
master
Choose a base branch
from
rsavenok/add-prettier-formatter-2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e322d97
Add prettier
sfc-gh-rsavenok e215395
reformat the repo
sfc-gh-rsavenok c7d8720
Add missing format
sfc-gh-rsavenok 8f392f3
lol
sfc-gh-rsavenok 586b4ca
Remove duplicated eslint rules
sfc-gh-rsavenok b40cfe8
disable eslint rule
sfc-gh-rsavenok 192e1ad
Have less lint/format scripts
sfc-gh-rsavenok File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,40 @@ | ||
module.exports = { | ||
'env': { | ||
'browser': true, | ||
'commonjs': true, | ||
'es2021': true, | ||
'mocha': true, | ||
'node': true | ||
env: { | ||
browser: true, | ||
commonjs: true, | ||
es2021: true, | ||
mocha: true, | ||
node: true, | ||
}, | ||
'extends': 'eslint:recommended', | ||
'overrides': [ | ||
extends: 'eslint:recommended', | ||
overrides: [ | ||
{ | ||
'files': ['samples/*.js'], | ||
'rules': { | ||
files: ['samples/*.js'], | ||
rules: { | ||
'no-console': ['off'], | ||
} | ||
} | ||
}, | ||
}, | ||
], | ||
'parserOptions': { | ||
'ecmaVersion': 'latest' | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
}, | ||
'rules': { | ||
'array-bracket-spacing': ['error'], | ||
'arrow-spacing': ['error'], | ||
'block-spacing': ['error'], | ||
'brace-style': ['error', '1tbs'], | ||
'camelcase': ['error'], | ||
'comma-spacing': ['error'], | ||
'curly': ['error', 'all'], | ||
'eqeqeq': ['error', 'always', { 'null': 'ignore' }], | ||
'indent': ['error', 2], | ||
'key-spacing': ['error'], | ||
'keyword-spacing': ['error'], | ||
'linebreak-style': ['error', 'unix'], | ||
rules: { | ||
camelcase: ['error'], | ||
curly: ['error', 'all'], | ||
eqeqeq: ['error', 'always', { null: 'ignore' }], | ||
'no-async-promise-executor': ['error'], | ||
'no-console': ['error', { 'allow': ['warn', 'error'] }], | ||
'no-console': ['error', { allow: ['warn', 'error'] }], | ||
'no-empty': ['error'], | ||
'no-ex-assign': ['error'], | ||
'no-extra-semi': ['error'], | ||
'no-inner-declarations': ['error'], | ||
'no-loss-of-precision': ['error'], | ||
'no-mixed-spaces-and-tabs': ['error'], | ||
'no-prototype-builtins': ['error'], | ||
'no-redeclare': ['error'], | ||
'no-undef': ['error'], | ||
'no-unused-vars': ['error'], | ||
'no-useless-catch': ['error'], | ||
'no-useless-escape': ['error'], | ||
'no-var': ['error'], | ||
'object-curly-spacing': ['error', 'always'], | ||
'prefer-const': ['error'], | ||
'quotes': ['error', 'single'], | ||
'semi': ['error', 'always'], | ||
'semi-spacing': ['error'], | ||
'space-before-function-paren': ['error', { | ||
'anonymous': 'always', | ||
'named': 'never', | ||
'asyncArrow': 'always', | ||
}], | ||
'space-infix-ops': ['error'], | ||
} | ||
}, | ||
}; |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
### Description | ||
|
||
Please explain the changes you made here. | ||
|
||
### Checklist | ||
- [ ] Format code according to the existing code style (run `npm run lint:check -- CHANGED_FILES` and fix problems in changed code) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed this one as our GH actions will fail anyway if the code is not linted |
||
|
||
- [ ] Create tests which fail without the change (if possible) | ||
- [ ] Make all tests (unit and integration) pass (`npm run test:unit` and `npm run test:integration`) | ||
- [ ] Extend the types in index.d.ts file (if necessary) | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
name: Audit | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- v* | ||
pull_request: | ||
branches: | ||
- master | ||
- prep-** | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- v* | ||
pull_request: | ||
branches: | ||
- master | ||
- prep-** | ||
|
||
jobs: | ||
lint: | ||
name: Run audit | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18.x' | ||
- name: Install dependencies | ||
run: npm i | ||
- name: Run audit | ||
run: npm audit | ||
lint: | ||
name: Run audit | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18.x' | ||
- name: Install dependencies | ||
run: npm i | ||
- name: Run audit | ||
run: npm audit |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed all rules that are defaults in prettier