-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from entur/chore/initial-commit
chore: 🤖 Initial commit
- Loading branch information
Showing
21 changed files
with
11,108 additions
and
1 deletion.
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,13 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
indent_size = 2 |
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 @@ | ||
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,213 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true | ||
}, | ||
globals: { | ||
process: true | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:import/recommended', | ||
'plugin:import/typescript', | ||
'plugin:compat/recommended', | ||
'plugin:@typescript-eslint/eslint-recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'prettier' | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
ecmaFeatures: { | ||
classes: true | ||
} | ||
}, | ||
ignorePatterns: [ | ||
'*.js', | ||
'*.json', | ||
'*.cjs', | ||
], | ||
settings: { | ||
'import/resolver': { | ||
typescript: {} | ||
}, | ||
}, | ||
plugins: ['@typescript-eslint', 'import'], | ||
rules: { | ||
'import/no-named-as-default': 0, | ||
'padded-blocks': ['error', 'never'], | ||
'one-var': ['error', 'never'], | ||
'comma-dangle': 'off', | ||
'@typescript-eslint/comma-dangle': 'error', | ||
quotes: [1, 'single'], | ||
'no-undef': 2, | ||
'no-console': [ | ||
'warn', | ||
{ | ||
allow: ['warn', 'error'] | ||
} | ||
], | ||
'import/order': [ | ||
'error', | ||
{ | ||
groups: [ | ||
'external', | ||
'builtin', | ||
'internal', | ||
'parent', | ||
'sibling', | ||
'index' | ||
], | ||
pathGroupsExcludedImportTypes: ['internal'], | ||
alphabetize: { | ||
order: 'asc', | ||
caseInsensitive: true | ||
}, | ||
'newlines-between': 'always' | ||
} | ||
], | ||
// Note: you must disable the base rule as it can report incorrect errors | ||
'no-unused-vars': 'off', | ||
'prefer-const': 'error', | ||
'global-strict': 0, | ||
indent: [ | ||
1, | ||
2, | ||
{ | ||
SwitchCase: 1 | ||
} | ||
], | ||
'no-extra-semi': 1, | ||
'no-underscore-dangle': 0, | ||
'no-trailing-spaces': [ | ||
1, | ||
{ | ||
skipBlankLines: true | ||
} | ||
], | ||
'padding-line-between-statements': [ | ||
'error', | ||
{ | ||
blankLine: 'always', | ||
prev: '*', | ||
next: 'return' | ||
}, | ||
{ | ||
blankLine: 'always', | ||
prev: '*', | ||
next: 'export' | ||
}, | ||
{ | ||
blankLine: 'always', | ||
prev: 'export', | ||
next: 'export' | ||
}, | ||
{ | ||
blankLine: 'always', | ||
prev: 'export', | ||
next: '*' | ||
}, | ||
{ | ||
blankLine: 'always', | ||
prev: '*', | ||
next: 'if' | ||
}, | ||
{ | ||
blankLine: 'always', | ||
prev: 'if', | ||
next: '*' | ||
}, | ||
{ | ||
blankLine: 'always', | ||
prev: 'const', | ||
next: '*' | ||
}, | ||
{ | ||
blankLine: 'always', | ||
prev: '*', | ||
next: 'const' | ||
}, | ||
{ | ||
blankLine: 'always', | ||
prev: 'let', | ||
next: '*' | ||
}, | ||
{ | ||
blankLine: 'always', | ||
prev: '*', | ||
next: 'let' | ||
}, | ||
{ | ||
blankLine: 'always', | ||
prev: 'var', | ||
next: '*' | ||
}, | ||
{ | ||
blankLine: 'always', | ||
prev: '*', | ||
next: 'var' | ||
}, | ||
{ | ||
blankLine: 'always', | ||
prev: 'const', | ||
next: 'let' | ||
}, | ||
{ | ||
blankLine: 'never', | ||
prev: 'const', | ||
next: 'const' | ||
}, | ||
{ | ||
blankLine: 'never', | ||
prev: 'let', | ||
next: 'let' | ||
}, | ||
{ | ||
blankLine: 'never', | ||
prev: 'var', | ||
next: 'var' | ||
}, | ||
{ | ||
blankLine: 'always', | ||
prev: 'const', | ||
next: 'let' | ||
}, | ||
{ | ||
blankLine: 'always', | ||
prev: 'const', | ||
next: 'var' | ||
}, | ||
{ | ||
blankLine: 'always', | ||
prev: 'let', | ||
next: 'var' | ||
}, | ||
{ | ||
blankLine: 'always', | ||
prev: '*', | ||
next: 'cjs-import' | ||
}, | ||
{ | ||
blankLine: 'always', | ||
prev: 'cjs-import', | ||
next: '*' | ||
}, | ||
{ | ||
blankLine: 'never', | ||
prev: 'cjs-import', | ||
next: 'cjs-import' | ||
} | ||
], | ||
'no-unreachable': 1, | ||
'no-alert': 1, | ||
semi: 1, | ||
'import/no-unused-modules': [ | ||
1, | ||
{ | ||
unusedExports: true, | ||
src: ['./src'] | ||
} | ||
] | ||
} | ||
}; |
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 @@ | ||
'section: workflows': | ||
- any: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- .github/workflows/** | ||
'section: repo': | ||
- any: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- '*' | ||
'experience: developer': | ||
- any: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- '.editorconfig' | ||
- '.eslintignore' | ||
- '.eslintrc.json' | ||
- '.eslintrc.js' | ||
- '.gitignore' | ||
- '.release-it.json' | ||
- '.renovate.json' | ||
- '.npmrc' | ||
- '.prettierrc' | ||
- 'tslint.json' | ||
'context: github': | ||
- any: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- .github/** | ||
'context: docker': | ||
- any: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- Dockerfile | ||
'context: npm': | ||
- any: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- '.npmrc' | ||
'context: rollup': | ||
- any: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- 'rollup.config.js' | ||
- 'rollup.config.mjs' | ||
- 'rollup.*.config.js' | ||
- 'rollup.*.config.mjs' | ||
'mindless: docs': | ||
- any: | ||
- head-branch: ['^docs', 'docs'] | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- '**/*.md' | ||
'mindless: dependencies': | ||
- any: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- 'package-lock.json' | ||
- 'yarn.lock' | ||
|
||
# Add '✨ feature' label to any PR where the head branch name starts with `feat` or has a `feat` section in the name | ||
'✨ feature': | ||
- head-branch: ['^feat', 'feat'] | ||
'problems: bug': | ||
- head-branch: ['^fix', 'fix'] | ||
'improvements: enhancement': | ||
- head-branch: ['^improvements', 'improvements'] | ||
|
||
# Add 'release' label to any PR that is opened against the `main` branch | ||
release: | ||
- base-branch: 'main' |
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,19 @@ | ||
name: Auto Assign | ||
on: | ||
issues: | ||
types: [opened] | ||
pull_request: | ||
types: [opened] | ||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
steps: | ||
- name: 'Auto-assign issue' | ||
uses: pozil/auto-assign-issue@v1 | ||
with: | ||
repo-token: ${{ secrets.GH_TOKEN }} | ||
assignees: phun-ky | ||
numOfAssignee: 1 |
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,62 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: Checks | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the "main" branch | ||
push: | ||
branches: [ "main" ] | ||
paths: | ||
- 'src' | ||
- 'package.json' | ||
- 'package-lock.json' | ||
- 'rollup.config.mjs' | ||
- 'tsconfig.json' | ||
- '.npmrc' | ||
pull_request: | ||
branches: [ "main" ] | ||
types: [opened, synchronize] # Workflow triggering events | ||
paths: | ||
- 'src' | ||
- 'package.json' | ||
- 'package-lock.json' | ||
- 'rollup.config.mjs' | ||
- 'tsconfig.json' | ||
- '.npmrc' | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "check" | ||
check: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Checkout all branches and tags | ||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.10.0 | ||
- name: Install dependencies | ||
run: | # Install and link dependencies | ||
npm i | ||
- name: Build # Build all packages | ||
run: npm run build | ||
notify: | ||
name: Notify failed check | ||
needs: check | ||
if: failure() && github.event.pull_request == null | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: jayqi/failed-build-issue-action@v1 | ||
with: | ||
github-token: ${{ secrets.GH_TOKEN }} |
Oops, something went wrong.