Skip to content

Commit

Permalink
fix activeWarn
Browse files Browse the repository at this point in the history
  • Loading branch information
TA2k committed Nov 15, 2023
1 parent c27be8b commit 0deef6b
Show file tree
Hide file tree
Showing 13 changed files with 3,382 additions and 1,174 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.prettierrc.js
**/.eslintrc.js
admin/words.js
75 changes: 41 additions & 34 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,42 @@
{
"env": {
"es6": true,
"node": true,
"mocha": true
},
"extends": "eslint:recommended",
"rules": {
"indent": [
"error",
"space",
{
"SwitchCase": 1
}
],
"no-console": "off",
"no-var": "error",
"prefer-const": "error",
"quotes": [
"error",
"double",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
],
"semi": [
"error",
"always"
]
},
"parserOptions": {
"ecmaVersion": 2018
}
}
"root": true,
"env": {
"es6": true,
"node": true,
"mocha": true
},
"extends": ["eslint:recommended"],
"plugins": [],
"rules": {
"indent": [
"error",
2,
{
"SwitchCase": 1
}
],
"no-console": "off",
"no-unused-vars": [
"error",
{
"ignoreRestSiblings": true,
"argsIgnorePattern": "^_"
}
],
"no-var": "error",
"no-trailing-spaces": "error",
"prefer-const": "error",
"quotes": [
"error",
"single",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
],
"semi": ["error", "always"]
},
"parserOptions": {
"ecmaVersion": 2020
}
}
110 changes: 55 additions & 55 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,78 +3,78 @@ name: Test and Release
# Run this job on all pushes and pull requests
# as well as tags with a semantic version
on:
push:
branches:
- "*"
tags:
# normal versions
- "v[0-9]+.[0-9]+.[0-9]+"
# pre-releases
- "v[0-9]+.[0-9]+.[0-9]+-**"
pull_request: {}
push:
branches:
- '*'
tags:
# normal versions
- 'v[0-9]+.[0-9]+.[0-9]+'
# pre-releases
- 'v[0-9]+.[0-9]+.[0-9]+-**'
pull_request: {}

jobs:
# Performs quick checks before the expensive test runs
check-and-lint:
if: contains(github.event.head_commit.message, '[skip ci]') == false
# Performs quick checks before the expensive test runs
check-and-lint:
if: contains(github.event.head_commit.message, '[skip ci]') == false

runs-on: ubuntu-latest
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]
strategy:
matrix:
node-version: [20.x]

steps:
- name: Checkout code
uses: actions/checkout@v2
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install Dependencies
run: npm install
- name: Install Dependencies
run: npm install

- name: Lint source code
run: npm run lint
- name: Test package files
run: npm run test:package
- name: Lint source code
run: npm run lint
- name: Test package files
run: npm run test:package

# Runs adapter tests on all supported node versions and OSes
adapter-tests:
if: contains(github.event.head_commit.message, '[skip ci]') == false
# Runs adapter tests on all supported node versions and OSes
adapter-tests:
if: contains(github.event.head_commit.message, '[skip ci]') == false

needs: [check-and-lint]
needs: [check-and-lint]

runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [20.x, 18.x, 16.x]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- name: Checkout code
uses: actions/checkout@v2
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install Dependencies
run: npm install
- name: Install Dependencies
run: npm install

- name: Run unit tests
run: npm run test:unit
- name: Run unit tests
run: npm run test:unit

- name: Run integration tests (unix only)
if: startsWith(runner.OS, 'windows') == false
run: DEBUG=testing:* npm run test:integration
- name: Run integration tests (unix only)
if: startsWith(runner.OS, 'windows') == false
run: DEBUG=testing:* npm run test:integration

- name: Run integration tests (windows only)
if: startsWith(runner.OS, 'windows')
run: set DEBUG=testing:* & npm run test:integration
- name: Run integration tests (windows only)
if: startsWith(runner.OS, 'windows')
run: set DEBUG=testing:* & npm run test:integration
# TODO: To enable automatic npm releases, create a token on npmjs.org
# Enter this token as a GitHub secret (with name NPM_TOKEN) in the repository options
# Then uncomment the following block:
Expand Down
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
package.json
package-lock.json
9 changes: 9 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
semi: true,
trailingComma: 'all',
singleQuote: true,
printWidth: 120,
useTabs: false,
tabWidth: 2,
endOfLine: 'lf',
};

0 comments on commit 0deef6b

Please sign in to comment.