Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 40 additions & 33 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,70 +10,77 @@ module.exports = {
'prettier',
],
rules: {
'@typescript-eslint/no-unused-vars': ['error', {
"argsIgnorePattern": "^_",
// TODO(STENCIL-452): Investigate using eslint-plugin-react to remove the need for varsIgnorePattern
"varsIgnorePattern": "^(h|Fragment)$"
}],
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
// TODO(STENCIL-452): Investigate using eslint-plugin-react to remove the need for varsIgnorePattern
varsIgnorePattern: '^(h|Fragment)$',
},
],
/**
* Configuration for Jest rules can be found here:
* Configuration for Jest rules can be found here:
* https://github.com/jest-community/eslint-plugin-jest/tree/main/docs/rules
*/
"jest/expect-expect": [
"error",
'jest/expect-expect': [
'error',
{
// we set this to `expect*` so that any function whose name starts with expect will be counted
// as an assertion function, allowing us to use functions to DRY up test suites.
"assertFunctionNames": ["expect*"],
}
assertFunctionNames: ['expect*'],
},
],
// we...have a number of things disabled :)
// TODO(STENCIL-488): Turn this rule back on once there are no violations of it remaining
"jest/no-disabled-tests": ["off"],
'jest/no-disabled-tests': ['off'],
// we use this in enough places that we don't want to do per-line disables
"jest/no-conditional-expect": ["off"],
'jest/no-conditional-expect': ['off'],
// this enforces that Jest hooks (e.g. `beforeEach`) are declared in test files in their execution order
// see here for details: https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-hooks-in-order.md
"jest/prefer-hooks-in-order": ["warn"],
'jest/prefer-hooks-in-order': ['warn'],
// this enforces that Jest hooks (e.g. `beforeEach`) are declared at the top of `describe` blocks
"jest/prefer-hooks-on-top": ["warn"],
'jest/prefer-hooks-on-top': ['warn'],
/**
* Configuration for the JSDoc plugin rules can be found at:
* https://github.com/gajus/eslint-plugin-jsdoc
*/
// validates that the name immediately following `@param` matches the parameter name in the function signature
// this works in conjunction with "jsdoc/require-param"
"jsdoc/check-param-names": [
"error", {
// if `checkStructured` is `true`, it asks that the JSDoc describe the fields being destructured.
// turn this off to not leak function internals/discourage describing them
checkDestructured: false,
}],
'jsdoc/check-param-names': [
'error',
{
// if `checkStructured` is `true`, it asks that the JSDoc describe the fields being destructured.
// turn this off to not leak function internals/discourage describing them
checkDestructured: false,
},
],
// require that jsdoc attached to a method/function require one `@param` per parameter
"jsdoc/require-param": [
"error", {
'jsdoc/require-param': [
'error',
{
// if `checkStructured` is `true`, it asks that the JSDoc describe the fields being destructured.
// turn this off to not leak function internals/discourage describing them
checkDestructured: false,
// always check setters as they should require a parameter (by definition)
checkSetters: true
}],
checkSetters: true,
},
],
// rely on TypeScript types to be the source of truth, minimize verbosity in comments
"jsdoc/require-param-type": ["off"],
"jsdoc/require-param-description": ["error"],
"jsdoc/require-returns-check": ["error"],
"jsdoc/require-returns-description": ["error"],
'jsdoc/require-param-type': ['off'],
'jsdoc/require-param-description': ['error'],
'jsdoc/require-returns-check': ['error'],
'jsdoc/require-returns-description': ['error'],
// rely on TypeScript types to be the source of truth, minimize verbosity in comments
"jsdoc/require-returns-type": ["off"],
"jsdoc/require-returns": ["error"],
'jsdoc/require-returns-type': ['off'],
'jsdoc/require-returns': ['error'],
'prefer-const': 'error',
'no-var': 'error',
'prefer-rest-params': 'error',
'prefer-spread': 'error',
},
// inform ESLint about the global variables defined in a Jest context
// see https://github.com/jest-community/eslint-plugin-jest/#usage
"env": {
"jest/globals": true
}
env: {
'jest/globals': true,
},
};
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ body:
description: Please reproduce this issue in a blank Stencil starter application and provide a link to the repo. Run `npm init stencil` to quickly spin up a Stencil project. This is the best way to ensure this issue is triaged quickly. Issues without a code reproduction may be closed if the Stencil Team cannot reproduce the issue you are reporting.
placeholder: https://github.com/...
validations:
required: true
required: true
- type: textarea
attributes:
label: Additional Information
Expand Down
16 changes: 8 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
- package-ecosystem: 'npm' # See documentation for possible values
directory: '/' # Location of package manifests
schedule:
interval: "daily"
interval: 'daily'
open-pull-requests-limit: 5
# Disable rebasing for pull requests, as having several open pull requests all get simultaneously rebased gets
# noisy from a notification standpoint
rebase-strategy: "disabled"
rebase-strategy: 'disabled'
ignore:
- dependency-name: "@types/node"
versions: ["17", "18"]
- dependency-name: "typescript"
versions: ["4.8"]
- dependency-name: '@types/node'
versions: ['17', '18']
- dependency-name: 'typescript'
versions: ['4.8']
22 changes: 11 additions & 11 deletions .github/ionic-issue-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ triage:

closeAndLock:
labels:
- label: "ionitron: support"
- label: 'ionitron: support'
message: >
Thanks for the issue! This issue appears to be a support request. We use this issue tracker exclusively for
bug reports and feature requests. Please use our [slack channel](https://stencil-worldwide.herokuapp.com/)
for questions about Stencil.


Thank you for using Stencil!
- label: "ionitron: missing template"
- label: 'ionitron: missing template'
message: >
Thanks for the issue! It appears that you have not filled out the provided issue template. We use this issue
template in order to gather more information and further assist you. Please create a new issue and ensure the
Expand All @@ -26,7 +26,7 @@ closeAndLock:

comment:
labels:
- label: "ionitron: needs reproduction"
- label: 'ionitron: needs reproduction'
message: >
Thanks for the issue! This issue has been labeled as `needs reproduction`. This label is added to issues that
need a code reproduction.
Expand Down Expand Up @@ -56,7 +56,7 @@ noReply:
noReproduction:
days: 14
maxIssuesPerRun: 100
label: "ionitron: needs reproduction"
label: 'ionitron: needs reproduction'
responseLabel: triage
exemptProjects: true
exemptMilestones: true
Expand All @@ -74,18 +74,18 @@ stale:
days: 30
maxIssuesPerRun: 100
exemptLabels:
- "Bug: Validated"
- "Feature: Want this? Upvote it!"
- 'Bug: Validated'
- 'Feature: Want this? Upvote it!'
- good first issue
- help wanted
- Request For Comments
- "Resolution: Needs Investigation"
- "Resolution: Refine"
- 'Resolution: Needs Investigation'
- 'Resolution: Refine'
- triage
exemptAssigned: true
exemptProjects: true
exemptMilestones: true
label: "ionitron: stale issue"
label: 'ionitron: stale issue'
message: >
Thanks for the issue! This issue is being closed due to inactivity. If this is still
an issue with the latest version of Stencil, please create a new issue and ensure the
Expand All @@ -99,7 +99,7 @@ stale:

wrongRepo:
repos:
- label: "ionitron: cli"
- label: 'ionitron: cli'
repo: ionic-cli
message: >
Thanks for the issue! We use this issue tracker exclusively for bug reports and feature requests
Expand All @@ -108,7 +108,7 @@ wrongRepo:


Thank you for using Stencil!
- label: "ionitron: ionic"
- label: 'ionitron: ionic'
repo: ionic
message: >
Thanks for the issue! We use this issue tracker exclusively for bug reports and feature requests
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@ jobs:

analysis_tests:
name: Analysis Tests
needs: [ build_core ]
needs: [build_core]
uses: ./.github/workflows/test-analysis.yml

bundler_tests:
name: Bundler Tests
needs: [ build_core ]
needs: [build_core]
uses: ./.github/workflows/test-bundlers.yml

e2e_tests:
name: E2E Tests
needs: [ build_core ]
needs: [build_core]
uses: ./.github/workflows/test-e2e.yml

unit_tests:
name: Unit Tests
needs: [ build_core ]
needs: [build_core]
uses: ./.github/workflows/test-unit.yml
8 changes: 4 additions & 4 deletions .github/workflows/tech-debt-burndown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strict_null_check: # TODO(STENCIL-446): Remove this workflow once `strictNullChecks` is enabled
strategy:
matrix:
branch: [ 'main', 'pr' ]
branch: ['main', 'pr']
name: 'Get strictNullChecks errors on ${{ matrix.branch }}'
runs-on: 'ubuntu-latest'
steps:
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
unused_exports_check:
strategy:
matrix:
branch: [ 'main', 'pr' ]
branch: ['main', 'pr']
name: Find unused variables on ${{ matrix.branch }}
runs-on: 'ubuntu-latest'
steps:
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
path: 'unused-exports-${{ matrix.branch }}.txt'

format_report:
needs: [ "strict_null_check", "unused_exports_check" ]
needs: ['strict_null_check', 'unused_exports_check']
name: Download error files and report
runs-on: 'ubuntu-latest'
steps:
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
- name: Set action output
run: node scripts/build/tech-debt-burndown-report.js > $GITHUB_STEP_SUMMARY

# for syntax information, see https://github.com/peter-evans/create-or-update-comment#setting-the-comment-body-from-a-file
# for syntax information, see https://github.com/peter-evans/create-or-update-comment#setting-the-comment-body-from-a-file
- name: Set comment body
id: set-comment-body
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [ '12', '14', '16' ]
os: [ 'ubuntu-latest', 'windows-latest' ]
node: ['12', '14', '16']
os: ['ubuntu-latest', 'windows-latest']
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-browserstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run_browserstack:
name: Run Browserstack
runs-on: ubuntu-latest
needs: [ build_core ]
needs: [build_core]

# The concurrency field allows us to block multiple invocations of this job across multiple workflow runs.
# Stencil is only able to run 5 parallel tests in Browserstack, which is exceeded when more than one run of this
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [ '12', '14', '16' ]
os: [ 'ubuntu-latest', 'windows-latest' ]
node: ['12', '14', '16']
os: ['ubuntu-latest', 'windows-latest']
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [ '12', '14', '16' ]
os: [ 'ubuntu-latest', 'windows-latest' ]
node: ['12', '14', '16']
os: ['ubuntu-latest', 'windows-latest']
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@ module.exports = {
testRegex: '/(src|scripts)/.*\\.spec\\.(ts|tsx|js)$',
// TODO(STENCIL-307): Move away from Jasmine runner for internal Stencil tests, which involves re-working environment
// setup
testRunner: 'jest-jasmine2'
testRunner: 'jest-jasmine2',
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"license": "node scripts --license",
"lint": "eslint \"src/*.ts\" \"src/**/*.ts\" \"src/**/*.tsx\"",
"prettier": "npm run prettier.base -- --write",
"prettier.base": "prettier \"./({bin,scripts,src,test}/**/*.{ts,tsx,js,jsx})|bin/stencil\"",
"prettier.base": "prettier \"./({bin,scripts,src,test}/**/*.{ts,tsx,js,jsx})|bin/stencil|.github/(**/)?*.(yml|yaml)|*.js\"",
"prettier.dry-run": "npm run prettier.base -- --list-different",
"release": "node scripts --release --publish",
"release.prepare": "node scripts --release --prepare",
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { createBuild } = require('./scripts/build/build.js');
const { getOptions } = require('./scripts/build/utils/options.js');

module.exports = function(args) {
module.exports = function (args) {
const opts = getOptions(__dirname, {
isProd: !!args['config-prod'],
isCI: !!args['config-ci'],
Expand Down