forked from electron/forge
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use custom eslint config + prettier instead of airbnb config (
electron#2520) * chore: add test scripts
- Loading branch information
Showing
218 changed files
with
4,748 additions
and
4,274 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
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 |
---|---|---|
@@ -1,5 +1,8 @@ | ||
dist | ||
docs/ | ||
node_modules | ||
*.d.ts | ||
packages/*/*/doc | ||
packages/*/*/index.ts | ||
packages/**/bad.js | ||
tmpl |
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 |
---|---|---|
@@ -1,90 +1,92 @@ | ||
{ | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 8, | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"mocha", | ||
"@typescript-eslint" | ||
], | ||
"plugins": ["mocha"], | ||
"env": { | ||
"mocha": true, | ||
"node": true | ||
"mocha": true | ||
}, | ||
"extends": [ | ||
"airbnb-base", | ||
"plugin:import/typescript" | ||
], | ||
"extends": ["@malept/eslint-config/src/common"], | ||
"globals": { | ||
"NodeJS": "readonly" | ||
}, | ||
"rules": { | ||
"class-methods-use-this": "off", | ||
"import/extensions": [ | ||
"no-unused-vars": [ | ||
"error", | ||
"always", | ||
{ | ||
"js": "never", | ||
"ts": "never" | ||
"args": "after-used", | ||
"argsIgnorePattern": "^_", | ||
"ignoreRestSiblings": true, | ||
"vars": "all" | ||
} | ||
], | ||
"import/no-cycle": "off", | ||
"import/no-extraneous-dependencies": ["error", { "devDependencies": ["packages/**/test/**/*_spec*.ts"] }], | ||
"mocha/no-exclusive-tests": "error", | ||
"no-await-in-loop": "off", | ||
"no-param-reassign": "off", | ||
"no-restricted-syntax": [ | ||
"error", | ||
{ | ||
"selector": "ForInStatement", | ||
"message": "for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array." | ||
}, | ||
{ | ||
"selector": "LabeledStatement", | ||
"message": "Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand." | ||
}, | ||
{ | ||
"selector": "WithStatement", | ||
"message": "`with` is disallowed in strict mode because it makes code impossible to predict and optimize." | ||
} | ||
], | ||
"no-shadow": "off", | ||
"@typescript-eslint/no-shadow": ["error"], | ||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-this-alias": ["error", { | ||
"allowDestructuring": true | ||
}], | ||
"@typescript-eslint/no-unused-vars": ["error", { | ||
"args": "after-used", | ||
"argsIgnorePattern": "^_", | ||
"ignoreRestSiblings": true, | ||
"vars": "all" | ||
}], | ||
"no-use-before-define": "off", | ||
"@typescript-eslint/no-use-before-define": ["error"] | ||
"mocha/no-exclusive-tests": "error" | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["**/*.ts"], | ||
"extends": ["@malept/eslint-config/src/typescript"], | ||
"rules": { | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
"args": "after-used", | ||
"argsIgnorePattern": "^_", | ||
"ignoreRestSiblings": true, | ||
"vars": "all" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"files": ["packages/*/*/test/**/*_spec*.ts"], | ||
"rules": { | ||
"global-require": "off", | ||
"import/no-dynamic-require": "off" | ||
} | ||
} | ||
], | ||
"settings": { | ||
"import/extensions": [ | ||
".js", | ||
".ts" | ||
], | ||
"import/parsers": { | ||
"@typescript-eslint/parser": [".ts"] | ||
}, | ||
"import/resolver": { | ||
"node": { | ||
"extensions": [".js", ".json", ".ts"] | ||
{ | ||
"files": ["packages/api/cli/src/**/*.ts", "tools/*.{js,ts}"], | ||
"rules": { | ||
"no-process-exit": "off" | ||
} | ||
}, | ||
{ | ||
"files": ["packages/api/core/test/**/*.ts", "packages/maker/*/src/Maker*.ts"], | ||
"rules": { | ||
"@typescript-eslint/no-var-requires": "off" | ||
} | ||
}, | ||
{ | ||
"files": ["packages/*/*/test/fixture/**/*.js", "packages/*/*/test/fixtures/**/*.js"], | ||
"rules": { | ||
"node/no-extraneous-require": "off", | ||
"node/no-missing-require": "off", | ||
"node/no-unpublished-require": "off" | ||
} | ||
}, | ||
{ | ||
"files": ["packages/plugin/webpack/test/fixtures/**/*.js"], | ||
"rules": { | ||
"no-process-exit": "off", | ||
"no-undef": "off", | ||
"import/no-unresolved": "off", | ||
"node/no-missing-import": "off", | ||
"node/no-unpublished-import": "off", | ||
"node/no-unsupported-features/es-syntax": "off" | ||
} | ||
}, | ||
{ | ||
"files": ["packages/utils/web-multi-logger/static/*.js"], | ||
"env": { | ||
"browser": true, | ||
"node": false | ||
} | ||
}, | ||
{ | ||
"files": ["tools/*.{js,ts}"], | ||
"rules": { | ||
"node/no-unpublished-import": "off", | ||
"node/no-unpublished-require": "off", | ||
"node/shebang": "off" | ||
} | ||
} | ||
} | ||
] | ||
} |
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 |
---|---|---|
@@ -1,40 +1,40 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
- package-ecosystem: 'npm' | ||
directory: '/' | ||
# Check the npm registry for updates every weekday | ||
schedule: | ||
interval: "daily" | ||
interval: 'daily' | ||
ignore: # Everything not annotated here is documented in tools/update-dependencies.js | ||
# @aws-sdk/* upgrades too often, do this manually | ||
- dependency-name: "@aws-sdk/client-s3" | ||
- dependency-name: "@aws-sdk/lib-storage" | ||
- dependency-name: "@aws-sdk/types" | ||
- dependency-name: "@types/node-fetch" | ||
- dependency-name: '@aws-sdk/client-s3' | ||
- dependency-name: '@aws-sdk/lib-storage' | ||
- dependency-name: '@aws-sdk/types' | ||
- dependency-name: '@types/node-fetch' | ||
- dependency-name: commander | ||
- dependency-name: electron-notarize | ||
- dependency-name: find-up | ||
- dependency-name: log-symbols | ||
- dependency-name: node-fetch | ||
- dependency-name: ora | ||
- dependency-name: username | ||
- package-ecosystem: "npm" | ||
directory: "/packages/template/typescript/tmpl" | ||
- package-ecosystem: 'npm' | ||
directory: '/packages/template/typescript/tmpl' | ||
# Check the npm registry for updates every weekday | ||
schedule: | ||
interval: "daily" | ||
- package-ecosystem: "npm" | ||
directory: "/packages/template/typescript-webpack/tmpl" | ||
interval: 'daily' | ||
- package-ecosystem: 'npm' | ||
directory: '/packages/template/typescript-webpack/tmpl' | ||
# Check the npm registry for updates every weekday | ||
schedule: | ||
interval: "daily" | ||
- package-ecosystem: "npm" | ||
directory: "/packages/template/webpack/tmpl" | ||
interval: 'daily' | ||
- package-ecosystem: 'npm' | ||
directory: '/packages/template/webpack/tmpl' | ||
# Check the npm registry for updates every weekday | ||
schedule: | ||
interval: "daily" | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
interval: 'daily' | ||
- package-ecosystem: 'github-actions' | ||
directory: '/' | ||
schedule: | ||
# Check for updates to GitHub Actions every weekday | ||
interval: "daily" | ||
interval: 'daily' |
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 |
---|---|---|
|
@@ -12,18 +12,18 @@ jobs: | |
dependabolt: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Use Node.js LTS | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 14.x | ||
cache: yarn | ||
- name: Run dependabolt | ||
if: ${{ github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.ref, 'dependabot/npm_and_yarn') && !contains(github.event.pull_request.head.ref, 'npm_and_yarn/packages') }} | ||
uses: malept/[email protected] | ||
env: | ||
DEPENDABOLT_SSH_DEPLOY_KEY: ${{ secrets.DEPENDABOLT_SSH_DEPLOY_KEY }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: actions/[email protected] | ||
- name: Use Node.js LTS | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 14.x | ||
cache: yarn | ||
- name: Run dependabolt | ||
if: ${{ github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.ref, 'dependabot/npm_and_yarn') && !contains(github.event.pull_request.head.ref, 'npm_and_yarn/packages') }} | ||
uses: malept/[email protected] | ||
env: | ||
DEPENDABOLT_SSH_DEPLOY_KEY: ${{ secrets.DEPENDABOLT_SSH_DEPLOY_KEY }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
fast-tests: | ||
runs-on: ${{ matrix.os }} | ||
needs: dependabolt | ||
|
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 |
---|---|---|
@@ -1,11 +1,7 @@ | ||
const path = require('path') | ||
const path = require('path'); | ||
|
||
module.exports = { | ||
"require": [ | ||
"ts-node/register", | ||
"@babel/register", | ||
path.join(__dirname, "tools", "test-setup.ts") | ||
], | ||
"timeout": 800000, | ||
"recursive": true | ||
} | ||
require: ['ts-node/register', '@babel/register', path.join(__dirname, 'tools', 'test-setup.ts')], | ||
timeout: 800000, | ||
recursive: true, | ||
}; |
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 |
---|---|---|
@@ -1,7 +1,5 @@ | ||
{ | ||
"name": "forge-docs", | ||
"type": "static", | ||
"alias": [ | ||
"js.electronforge.io" | ||
] | ||
} | ||
"alias": ["js.electronforge.io"] | ||
} |
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 @@ | ||
.nyc_output | ||
dist/ | ||
docs/ | ||
packages/*/*/dist | ||
packages/*/*/doc | ||
packages/*/*/index.d.ts | ||
packages/*/*/index.ts | ||
packages/*/*/README.md | ||
packages/*/*/tsconfig.json | ||
packages/api/core/test/fixture/bad_external_forge_config/bad.js |
Oops, something went wrong.