Skip to content

Commit

Permalink
fix: repo upgrade
Browse files Browse the repository at this point in the history
- drop unused files
  - analysis.json
  - index.html
  - polymer.json
  - wct.conf.json
- switch to karm
  - add karma problem matcher
- switch github workflow to setup-node eslint problem matcher
- update codeclimate conf
- update vscode settings
- add es-dev-server
- upgrade deps
- convert most tests to karma
  • Loading branch information
Patrik Kullman authored and cristinecula committed Apr 15, 2020
1 parent b258984 commit 174cdd4
Show file tree
Hide file tree
Showing 23 changed files with 16,097 additions and 24,382 deletions.
24 changes: 7 additions & 17 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
version: "2"
checks:
argument-count:
enabled: false # handled by eslint rule "max-params"
enabled: false # handled by eslint rule "max-params"
complex-logic:
enabled: true
config:
threshold: 4
file-lines:
enabled: false # handled by eslint rule "max-lines"
enabled: false # handled by eslint rule "max-lines"
method-complexity:
enabled: false # handled by eslint rule "complexity"
enabled: false # handled by eslint rule "complexity"
method-count:
enabled: true
config:
threshold: 20
method-lines:
enabled: false # handled by eslint rule "max-lines-per-function"
enabled: false # handled by eslint rule "max-lines-per-function"
nested-control-flow:
enabled: false # handled by eslint rule "max-depth"
enabled: false # handled by eslint rule "max-depth"
return-statements:
enabled: true
config:
Expand All @@ -29,19 +29,9 @@ checks:
enabled: true

plugins:
eslint:
enabled: true
channel: "eslint-5"
config:
sanitize_batch: false
extensions:
- .js
- .html
fixme:
enabled: true

exclude_patterns:
- "bower_components/"
- "node_modules/"
- "demo/"
- "test/"
- "**/node_modules/"
- "coverage/"
30 changes: 30 additions & 0 deletions .github/karma-problem-matcher.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"problemMatcher": [{
"owner": "karma-eval",
"pattern": [{
"regexp": "^\\w+\\s\\d+\\.\\d+\\.\\d+\\s\\(\\w+\\s\\d+\\.\\d+\\.\\d+\\)\\sERROR$"
}, {
"regexp": "^\\s{2}(.*)$",
"message": 1
}, {
"regexp": "^\\s{2}at\\s([^:]*):(\\d+):(\\d+)$",
"file": 1,
"line": 2,
"column": 3
}]
}, {
"owner": "karma-test-error",
"pattern": [{
"regexp": "^\\w+\\s\\d+\\.\\d+\\.\\d+\\s\\(\\w+\\s\\d+\\.\\d+\\.\\d+\\)\\s(.*)FAILED$",
"code": 1
}, {
"regexp": "^\\t(.*)$",
"message": 1
}, {
"regexp": "^\\t {4}at\\s[^\\s]*\\s\\(([^:]*):(\\d+):(\\d+)\\)$",
"file": 1,
"line": 2,
"column": 3
}]
}]
}
11 changes: 5 additions & 6 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v1

- name: Use Node.js 10.x
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 10.x
node-version: 12.x

- name: Install
run: npm ci
Expand All @@ -26,9 +26,7 @@ jobs:
run: npx commitlint --from origin/master --to HEAD

- name: ESLint
run: npx github-actions-eslint-annotator
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run lint

- name: Test and report
env:
Expand All @@ -42,7 +40,8 @@ jobs:
run: |
([[ -e $NEO_CC ]] || curl -L $NEO_CC_URL > $NEO_CC) && chmod +x $NEO_CC
$NEO_CC before-build
npm run test $([ -z "$SAUCE_ACCESS_KEY"] && echo "-- --skip-plugin sauce")
echo "::add-matcher::.github/karma-problem-matcher.json"
npm test
$NEO_CC after-build --exit-code $?
- name: Semantic release
Expand Down
13 changes: 5 additions & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@

{
"eslint.autoFixOnSave": true,
"eslint.packageManager": "yarn",
"eslint.validate": [
{ "language": "javascript", "autoFix": true },
{ "language": "html", "autoFix": true }
],
"eslint.validate": [ "javascript" ],
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/**": true,
"**/bower_components/**": true
"**/node_modules/**": true
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
Loading

0 comments on commit 174cdd4

Please sign in to comment.