-
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.
Merge pull request #75 from meltwater/update-deps
update deps
- Loading branch information
Showing
7 changed files
with
2,537 additions
and
6,348 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,6 +1,85 @@ | ||
name: CI Pipeline | ||
on: [push] | ||
name: NPM Pipeline | ||
|
||
on: | ||
workflow_call: {} | ||
push: | ||
branches: | ||
- "*" | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
legion-npm-pipeline: | ||
uses: meltwater/legion-github-repos/.github/workflows/legion-npm-package.yml@master | ||
secrets: inherit | ||
Test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: "npm" | ||
registry-url: https://registry.npmjs.org | ||
cache-dependency-path: package-lock.json | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_INSTALL_TOKEN }} | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Run tests | ||
run: npm test | ||
|
||
Build: | ||
runs-on: ubuntu-latest | ||
needs: Test | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: "npm" | ||
registry-url: https://registry.npmjs.org | ||
cache-dependency-path: package-lock.json | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_INSTALL_TOKEN }} | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build package | ||
run: npm run build | ||
|
||
Publish: | ||
runs-on: ubuntu-latest | ||
needs: Build | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: "npm" | ||
registry-url: https://registry.npmjs.org | ||
cache-dependency-path: package-lock.json | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build package | ||
run: npm run build | ||
|
||
- name: Publish package | ||
run: npm publish |
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 +1 @@ | ||
lts/fermium | ||
lts/iron |
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,166 @@ | ||
import js from '@eslint/js'; | ||
import depend from 'eslint-plugin-depend'; | ||
import jsdoc from 'eslint-plugin-jsdoc'; | ||
import globals from 'globals'; | ||
|
||
export default [ | ||
jsdoc.configs['flat/recommended'], | ||
depend.configs['flat/recommended'], | ||
// http://eslint.org/docs/rules/ | ||
{ | ||
languageOptions: { | ||
ecmaVersion: 13, | ||
sourceType: 'module', | ||
globals: { | ||
...globals.browser, | ||
...globals.amd, | ||
...globals.jasmine, | ||
...globals.jest, | ||
...globals.es2015, | ||
...globals.node | ||
} | ||
} | ||
}, | ||
{ | ||
ignores: [ | ||
'**/*.test.js', | ||
'**/*.spec.js', | ||
'**/*.config.js' | ||
], | ||
rules: { | ||
...js.configs.recommended.rules, | ||
'default-case': 'error', | ||
'id-length': [ | ||
'error', | ||
{ | ||
min: 2, | ||
exceptions: ['id'] | ||
} | ||
], | ||
'no-alert': 'error', | ||
'no-duplicate-imports': 'error', | ||
'no-implicit-coercion': 'error', | ||
'no-implied-eval': 'error', | ||
'no-invalid-this': 'error', | ||
'no-labels': 'error', | ||
'no-lone-blocks': 'error', | ||
'no-loop-func': 'error', | ||
'no-magic-numbers': [ | ||
'error', | ||
{ | ||
ignore: [-1, 0, 1, 2] | ||
} | ||
], | ||
'no-param-reassign': 'error', | ||
'no-prototype-builtins': 0, | ||
'no-return-assign': ['error', 'always'], | ||
'no-script-url': 'error', | ||
'no-self-compare': 'error', | ||
'no-sequences': 'error', | ||
'no-throw-literal': 'error', | ||
'no-unmodified-loop-condition': 'error', | ||
'no-unused-expressions': 'error', | ||
'no-useless-call': 'error', | ||
'no-useless-concat': 'error', | ||
'no-useless-return': 'error', | ||
'no-void': 'error', | ||
'no-with': 'error', | ||
|
||
/** | ||
* Stylistic rules | ||
*/ | ||
|
||
camelcase: 'error', | ||
'comma-dangle': [ | ||
'error', | ||
'never' | ||
], | ||
complexity: 'error', | ||
curly: [ | ||
'error', | ||
'all' | ||
], | ||
indent: [ | ||
'error', | ||
4, // http://eslint.org/docs/rules/indent | ||
{ | ||
SwitchCase: 1 | ||
} | ||
], | ||
'max-depth': [ | ||
'error', | ||
3 // http://eslint.org/docs/rules/max-depth | ||
], | ||
'new-cap': 'error', | ||
'new-parens': 'error', | ||
'no-continue': 'error', | ||
'no-lonely-if': 'error', | ||
'no-multiple-empty-lines': [ | ||
'error', | ||
{ | ||
max: 1 | ||
} | ||
], | ||
'no-nested-ternary': 'error', | ||
'no-tabs': 'error', | ||
'no-trailing-spaces': [ | ||
'error', | ||
{ | ||
ignoreComments: true, | ||
skipBlankLines: true | ||
} | ||
], | ||
'no-unneeded-ternary': 'error', | ||
'no-unused-private-class-members': 'off', | ||
'no-unused-vars': ['error', { | ||
'vars': 'all', | ||
'args': 'all', | ||
'argsIgnorePattern': '^__', | ||
'varsIgnorePattern': '^__', | ||
'caughtErrorsIgnorePattern': '^__' | ||
}], | ||
'nonblock-statement-body-position': [ | ||
'error', | ||
'beside' // http://eslint.org/docs/rules/nonblock-statement-body-position | ||
], | ||
'one-var-declaration-per-line': [ | ||
'error', | ||
'always' | ||
], | ||
quotes: [ | ||
'error', | ||
'single' | ||
], | ||
semi: [ | ||
'error', | ||
'always' | ||
], | ||
'vars-on-top': 'error', | ||
|
||
/** | ||
* Depend Rules | ||
*/ | ||
'depend/ban-dependencies': 'warn', | ||
|
||
/** | ||
* JSdoc Rules | ||
*/ | ||
'jsdoc/require-jsdoc': 'off', | ||
'jsdoc/tag-lines': 'off', | ||
|
||
/** | ||
* ES6 Specific | ||
*/ | ||
|
||
'arrow-body-style': [ | ||
'error', | ||
'as-needed' | ||
], | ||
'no-confusing-arrow': 'error', | ||
'no-useless-constructor': 'error', | ||
'no-var': 'error', | ||
'prefer-const': 'error', | ||
'prefer-template': 'error' | ||
} | ||
} | ||
]; |
Oops, something went wrong.