Skip to content

Commit 6327885

Browse files
committed
update eslint. lint.
1 parent ba4afe8 commit 6327885

File tree

18 files changed

+153
-49
lines changed

18 files changed

+153
-49
lines changed

.github/contributing.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Contributing to fill-range
2+
3+
First and foremost, thank you! We appreciate that you want to contribute to fill-range, your time is valuable, and your contributions mean a lot to us.
4+
5+
**What does "contributing" mean?**
6+
7+
Creating an issue is the simplest form of contributing to a project. But there are many ways to contribute, including the following:
8+
9+
- Updating or correcting documentation
10+
- Feature requests
11+
- Bug reports
12+
13+
If you'd like to learn more about contributing in general, the [Guide to Idiomatic Contributing](https://github.com/jonschlinkert/idiomatic-contributing) has a lot of useful information.
14+
15+
**Showing support for fill-range**
16+
17+
Please keep in mind that open source software is built by people like you, who spend their free time creating things the rest the community can use.
18+
19+
Don't have time to contribute? No worries, here are some other ways to show your support for fill-range:
20+
21+
- star the [project](https://github.com/jonschlinkert/fill-range)
22+
- tweet your support for fill-range
23+
24+
## Issues
25+
26+
### Before creating an issue
27+
28+
Please try to determine if the issue is caused by an underlying library, and if so, create the issue there. Sometimes this is difficult to know. We only ask that you attempt to give a reasonable attempt to find out. Oftentimes the readme will have advice about where to go to create issues.
29+
30+
Try to follow these guidelines
31+
32+
- **Investigate the issue**:
33+
- **Check the readme** - oftentimes you will find notes about creating issues, and where to go depending on the type of issue.
34+
- Create the issue in the appropriate repository.
35+
36+
### Creating an issue
37+
38+
Please be as descriptive as possible when creating an issue. Give us the information we need to successfully answer your question or address your issue by answering the following in your issue:
39+
40+
- **version**: please note the version of fill-range are you using
41+
- **extensions, plugins, helpers, etc** (if applicable): please list any extensions you're using
42+
- **error messages**: please paste any error messages into the issue, or a [gist](https://gist.github.com/)
43+
44+
## Above and beyond
45+
46+
Here are some tips for creating idiomatic issues. Taking just a little bit extra time will make your issue easier to read, easier to resolve, more likely to be found by others who have the same or similar issue in the future.
47+
48+
- read the [Guide to Idiomatic Contributing](https://github.com/jonschlinkert/idiomatic-contributing)
49+
- take some time to learn basic markdown. This [markdown cheatsheet](https://gist.github.com/jonschlinkert/5854601) is super helpful, as is the GitHub guide to [basic markdown](https://help.github.com/articles/markdown-basics/).
50+
- Learn about [GitHub Flavored Markdown](https://help.github.com/articles/github-flavored-markdown/). And if you want to really go above and beyond, read [mastering markdown](https://guides.github.com/features/mastering-markdown/).
51+
- use backticks to wrap code. This ensures that code will retain its format, making it much more readable to others
52+
- use syntax highlighting by adding the correct language name after the first "code fence"
53+
54+
55+
[node-glob]: https://github.com/isaacs/node-glob
56+
[picomatch]: https://github.com/jonschlinkert/picomatch
57+
[micromatch]: https://github.com/jonschlinkert/micromatch
58+
[so]: http://stackoverflow.com/questions/tagged/fill-range

.github/workflows/codeql.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: "0 0 * * 0"
8+
9+
jobs:
10+
analyze:
11+
name: Analyze
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v2
17+
18+
# Initializes the CodeQL tools for scanning.
19+
- name: Initialize CodeQL
20+
uses: github/codeql-action/init@v1
21+
with:
22+
languages: "javascript"
23+
24+
- name: Autobuild
25+
uses: github/codeql-action/autobuild@v1
26+
27+
- name: Perform CodeQL Analysis
28+
uses: github/codeql-action/analyze@v1

.github/workflows/test.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CI
2+
on:
3+
- push
4+
- pull_request
5+
6+
env:
7+
CI: true
8+
FORCE_COLOR: 2
9+
10+
jobs:
11+
run:
12+
name: Node.js ${{ matrix.node }} @ ${{ matrix.os }}
13+
runs-on: ${{ matrix.os }}
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
node: [8, 10, 12, 14, 16, 18, 20, 22]
19+
os: [ubuntu-latest, windows-latest, macOS-latest]
20+
21+
steps:
22+
- name: Clone repository
23+
uses: actions/checkout@v2
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v2
27+
with:
28+
node-version: ${{ matrix.node }}
29+
30+
- name: Install npm dependencies
31+
run: npm install
32+
33+
- name: Run tests
34+
run: npm run test:ci
35+
36+
- name: Run Coveralls
37+
# `master` should be a tag but they don't have one
38+
uses: coverallsapp/github-action@master
39+
if: startsWith(matrix.os, 'ubuntu') && matrix.node == 14
40+
with:
41+
github-token: "${{ secrets.GITHUB_TOKEN }}"

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ vendor
2727
temp
2828
tmp
2929
TODO.md
30-
package-lock.json
30+
package-lock.json
31+
*.code-*

.travis.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

bench/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const fill70 = require('..');
1111
*/
1212

1313
const cycle = (e, newline) => {
14-
process.stdout.write(`\u001b[G ${e.target}${newline ? `\n` : ''}`);
14+
process.stdout.write(`\u001b[G ${e.target}${newline ? '\n' : ''}`);
1515
};
1616

1717
const bench = (name, options) => {

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,19 @@
2424
"node": ">=8"
2525
},
2626
"scripts": {
27-
"test": "mocha"
27+
"lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .",
28+
"mocha": "mocha --reporter dot",
29+
"test": "npm run lint && npm run mocha",
30+
"test:ci": "npm run test:cover",
31+
"test:cover": "nyc npm run mocha"
2832
},
2933
"dependencies": {
3034
"to-regex-range": "^5.0.1"
3135
},
3236
"devDependencies": {
3337
"gulp-format-md": "^2.0.0",
34-
"mocha": "^6.1.1"
38+
"mocha": "^6.1.1",
39+
"nyc": "^15.1.0"
3540
},
3641
"keywords": [
3742
"alpha",

test/custom-expand.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
'use strict';
22

3-
require('mocha');
4-
const assert = require('assert');
53
const exact = require('./support/exact');
64
const fill = require('..');
75

test/errors.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
'use strict';
22

3-
require('mocha');
43
const assert = require('assert');
54
const fill = require('..');
65

test/invalid.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
'use strict';
22

3-
require('mocha');
43
const assert = require('assert');
54
const fill = require('..');
65

0 commit comments

Comments
 (0)