Skip to content

Commit 5a973bc

Browse files
Added/updated tooling config files to match other JSDevTools projects
1 parent 2d7a77d commit 5a973bc

8 files changed

+63
-17
lines changed

.eslintrc.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# ESLint config
22
# http://eslint.org/docs/user-guide/configuring
3-
# https://github.com/JS-DevTools/eslint-config-modular
3+
# https://jstools.dev/eslint-config-modular/
44

55
root: true
66

77
extends:
8-
- modular/best-practices
9-
- modular/style
10-
- modular/es6
11-
- modular/node
8+
- "@jsdevtools/modular/best-practices"
9+
- "@jsdevtools/modular/style"
10+
- "@jsdevtools/modular/es6"
11+
- "@jsdevtools/modular/node"

.gitattributes

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Git attributes
2+
# https://git-scm.com/docs/gitattributes
3+
# https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes
4+
5+
# Normalize line endings for all files that git determines to be text.
6+
# https://git-scm.com/docs/gitattributes#gitattributes-Settostringvalueauto
7+
* text=auto
8+
9+
# Normalize line endings to LF on checkin, and do NOT convert to CRLF when checking-out on Windows.
10+
# https://git-scm.com/docs/gitattributes#gitattributes-Settostringvaluelf
11+
*.txt text eol=lf
12+
*.html text eol=lf
13+
*.md text eol=lf
14+
*.css text eol=lf
15+
*.scss text eol=lf
16+
*.map text eol=lf
17+
*.js text eol=lf
18+
*.jsx text eol=lf
19+
*.ts text eol=lf
20+
*.tsx text eol=lf
21+
*.json text eol=lf
22+
*.yml text eol=lf
23+
*.yaml text eol=lf
24+
*.xml text eol=lf
25+
*.svg text eol=lf

.mocharc.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Mocha options
2+
# https://mochajs.org/#configuring-mocha-nodejs
3+
# https://github.com/mochajs/mocha/blob/master/example/config/.mocharc.yml
4+
5+
spec:
6+
# Test fixtures
7+
- test/fixtures/**/*.js
8+
9+
# Test specs
10+
- test/specs/**/*.spec.js
11+
12+
bail: true
13+
recursive: true
14+
async-only: true
15+
retries: 2

.nycrc.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# NYC config
2+
# https://github.com/istanbuljs/nyc#configuration-files
3+
4+
extension:
5+
- .js
6+
- .ts
7+
8+
reporter:
9+
- text
10+
- lcov

.vscode/launch.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"name": "Run tests",
66
"type": "node",
77
"request": "launch",
8-
"program": "${workspaceRoot}/node_modules/.bin/_mocha",
8+
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
99
"stopOnEntry": false,
10-
"args": ["--bail", "--recursive", "tests/fixtures", "tests/specs"],
10+
"args": ["--timeout=600000"],
1111
"cwd": "${workspaceRoot}",
1212
"preLaunchTask": null,
1313
"runtimeExecutable": null,
@@ -22,4 +22,4 @@
2222
"outDir": null
2323
}
2424
]
25-
}
25+
}

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,13 @@
2424
"lib"
2525
],
2626
"scripts": {
27+
"clean": "shx rm -rf .nyc_output coverage",
2728
"lint": "eslint lib test/fixtures test/specs",
2829
"test": "mocha && npm run lint",
29-
"coverage": "nyc --reporter=text --reporter=lcov mocha",
30-
"upgrade": "npm-check -u",
30+
"coverage": "nyc node_modules/mocha/bin/mocha",
31+
"upgrade": "npm-check -u && npm audit fix",
3132
"bump": "bump --tag --push --all",
32-
"release": "npm run upgrade && npm run test && npm run bump"
33+
"release": "npm run upgrade && npm run clean && npm test && npm run bump"
3334
},
3435
"devDependencies": {
3536
"@jsdevtools/eslint-config-modular": "^8.0.0",

test/.eslintrc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
extends:
2-
- modular/test
2+
- "@jsdevtools/modular/test"

test/mocha.opts

-5
This file was deleted.

0 commit comments

Comments
 (0)