-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Gandi-IDE:main' into main
- Loading branch information
Showing
24 changed files
with
33,664 additions
and
3,204 deletions.
There are no files selected for viewing
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,71 @@ | ||
// eslint-disable-next-line no-undef | ||
module.exports = { | ||
env: { | ||
es2021: true, | ||
browser: true, | ||
}, | ||
extends: "eslint:recommended", | ||
overrides: [], | ||
parserOptions: { | ||
ecmaVersion: "latest", | ||
sourceType: "module", | ||
}, | ||
globals: { | ||
Blockly: "readonly", | ||
Scratch: "readonly", | ||
}, | ||
rules: { | ||
// Unused variables commonly indicate logic errors | ||
"no-unused-vars": [ | ||
"error", | ||
{ | ||
// Unused arguments are useful, eg. it can be nice for blocks to accept `args` even if they don't use it | ||
args: "none", | ||
// Allow silently eating try { } catch { } | ||
caughtErrors: "none", | ||
// Variables starting with _ are intentionally unused | ||
argsIgnorePattern: "^_", | ||
varsIgnorePattern: "^_", | ||
}, | ||
], | ||
// Allow while (true) { } | ||
"no-constant-condition": [ | ||
"error", | ||
{ | ||
checkLoops: false, | ||
}, | ||
], | ||
// Allow empty catch {} blocks | ||
"no-empty": [ | ||
"error", | ||
{ | ||
allowEmptyCatch: true, | ||
}, | ||
], | ||
// Returning a value from a constructor() implies a mistake | ||
"no-constructor-return": "error", | ||
// new Promise(async () => {}) implies a mistake | ||
"no-async-promise-executor": "warn", | ||
// x === x implies a mistake | ||
"no-self-compare": "error", | ||
// Using ${...} in a non-template-string implies a mistake | ||
"no-template-curly-in-string": "error", | ||
// Loops that only iterate once imply a mistake | ||
"no-unreachable-loop": "error", | ||
// Detect some untrusted code execution | ||
"no-eval": "error", | ||
"no-implied-eval": "error", | ||
"no-new-func": "error", | ||
"no-script-url": "error", | ||
// Combinations of || and && are unreadable and may not do what you expect | ||
"no-mixed-operators": [ | ||
"error", | ||
{ | ||
groups: [["&&", "||"]], | ||
}, | ||
], | ||
// Disallow async functions that don't need to be. This is important as a Promise and non-Promise return value | ||
// significantly impacts the behavior of projects. | ||
"require-await": "error", | ||
}, | ||
}; |
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,52 @@ | ||
# Originally from https://github.com/TurboWarp/extensions | ||
|
||
name: Validate | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
validate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
cache: npm | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Validate | ||
run: npm run validate | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
cache: npm | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Validate | ||
run: npm run lint | ||
|
||
format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
cache: npm | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Validate | ||
run: npm run check-format |
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 |
---|---|---|
|
@@ -7,7 +7,8 @@ node_modules | |
/coverage | ||
|
||
# production | ||
/dist | ||
dist/ | ||
|
||
|
||
/types | ||
|
||
|
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,4 @@ | ||
{ | ||
"trailingComma": "es5", | ||
"endOfLine": "auto" | ||
} |
Oops, something went wrong.