-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
development environment upgrades #6059
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
b177c9b
init work to upgrade node and linting
danstarns 57ddbca
Merge branch 'dev' into config/node-version
danstarns 2ab2aed
feat: add jest-environment-jsdom
danstarns 8afa7b4
test: refactor remove unused before
danstarns 0551bc8
fix: add option chain for frame
danstarns 68fb248
test: use correct jest spy
danstarns 1b0190c
skip jsdom broken tests
danstarns 070b8f8
config: *
danstarns 69ab89a
config: ignore dist in linting
danstarns 539abe6
format: apply transformations
danstarns 78872da
remove repeated config
danstarns 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
module.exports = { | ||
root: true, // Add this to indicate this is the root ESLint configuration | ||
env: { | ||
browser: true, | ||
node: true, | ||
'jest/globals': true, | ||
}, | ||
globals: { | ||
$: true, | ||
grapesjs: true, | ||
}, | ||
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'], | ||
plugins: ['@typescript-eslint', 'jest'], | ||
parserOptions: { | ||
ecmaVersion: 2021, | ||
sourceType: 'module', | ||
}, | ||
rules: { | ||
'no-var': 'off', | ||
'prefer-const': 'off', | ||
'no-prototype-builtins': 'off', | ||
'no-useless-escape': 'off', | ||
'prefer-rest-params': 'off', | ||
'no-empty': 'off', | ||
'prefer-spread': 'off', | ||
'no-extra-boolean-cast': 'off', | ||
'no-unsafe-optional-chaining': 'off', | ||
'no-shadow-restricted-names': 'off', | ||
'no-cond-assign': 'off', | ||
'no-fallthrough': 'off', | ||
'no-sparse-arrays': 'off', | ||
'no-redeclare': 'off', | ||
'no-control-regex': 'off', | ||
'no-constant-condition': 'off', | ||
'no-misleading-character-class': 'off', | ||
'no-undef': 'off', | ||
'no-func-assign': 'off', | ||
'no-regex-spaces': 'off', | ||
'@typescript-eslint/ban-ts-comment': 'off', | ||
'@typescript-eslint/no-require-imports': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-unused-vars': 'off', | ||
'@typescript-eslint/no-unused-expressions': 'off', | ||
'@typescript-eslint/no-unnecessary-type-const': 'off', | ||
'@typescript-eslint/no-empty-object-type': 'off', | ||
'@typescript-eslint/no-unnecessary-type-constraint': 'off', | ||
'@typescript-eslint/no-this-alias': 'off', | ||
'@typescript-eslint/no-unsafe-function-type': 'off', | ||
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off', | ||
'@typescript-eslint/no-wrapper-object-types': 'off', | ||
'linebreak-style': ['error', 'unix'], | ||
'max-len': ['error', { code: 300 }], | ||
'no-multiple-empty-lines': ['error', { max: 1, maxEOF: 1 }], | ||
}, | ||
ignorePatterns: ['docs/api/*', 'dist/*'], | ||
}; |
This file contains 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 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 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 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 |
---|---|---|
|
@@ -9,15 +9,14 @@ jobs: | |
if: ${{ false }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '12.x' | ||
node-version: '20.x' | ||
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. 8 major versions. |
||
registry-url: 'https://registry.npmjs.org' | ||
cache: 'yarn' | ||
- run: yarn --frozen-lockfile | ||
- run: yarn build | ||
- run: npm run lint | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains 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 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
docs/api/*.md | ||
dist/ |
This file contains 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"endOfLine": "lf", | ||
"insertPragma": false, | ||
"requirePragma": false, | ||
"trailingComma": "all", | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"singleQuote": true, | ||
"printWidth": 120 | ||
} |
This file contains 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 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
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.
Ideally, we don't want all these rules and just rely on the recommended, however, that requires mass code transformation to fulfill. Let's keep this PR mostly about config and then come back to blocks of rules and incrementally remove them.
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.
Yeah totally agree