Skip to content

Commit ffee1c2

Browse files
committed
Rewrite to ESM
1 parent c19f7b1 commit ffee1c2

18 files changed

+563
-991
lines changed

Diff for: .eslintignore

-3
This file was deleted.

Diff for: .eslintrc.yml

+19-139
Original file line numberDiff line numberDiff line change
@@ -1,142 +1,22 @@
1-
env:
2-
node: true
3-
browser: false
4-
es6: false
1+
extends: standard
52

6-
rules:
7-
accessor-pairs: 2
8-
array-bracket-spacing: [ 2, "always", { "singleValue": true, "objectsInArrays": true, "arraysInArrays": true } ]
9-
block-scoped-var: 2
10-
block-spacing: 2
11-
brace-style: [ 2, '1tbs', { allowSingleLine: true } ]
12-
# Postponed
13-
#callback-return: 2
14-
comma-dangle: 2
15-
comma-spacing: 2
16-
comma-style: 2
17-
computed-property-spacing: [ 2, never ]
18-
consistent-this: [ 2, self ]
19-
consistent-return: 2
20-
# ? change to multi
21-
curly: [ 2, 'multi-line' ]
22-
dot-notation: 2
23-
eol-last: 2
24-
eqeqeq: 2
25-
func-style: [ 2, declaration ]
26-
# Postponed
27-
#global-require: 2
28-
guard-for-in: 2
29-
handle-callback-err: 2
3+
overrides:
4+
-
5+
files: [ '*.mjs' ]
6+
rules:
7+
no-restricted-globals: [ 2, require, __dirname ]
8+
-
9+
files: [ 'test/**' ]
10+
env: { mocha: true }
11+
-
12+
files: [ 'lib/**', 'index.mjs' ]
13+
parserOptions: { ecmaVersion: 2015 }
3014

31-
indent: [ 2, 2, { VariableDeclarator: { var: 2, let: 2, const: 3 }, SwitchCase: 1 } ]
15+
ignorePatterns:
16+
- demo/
17+
- dist/
18+
- benchmark/extra/
3219

33-
# key-spacing: [ 2, { "align": "value" } ]
34-
keyword-spacing: 2
35-
linebreak-style: 2
36-
max-depth: [ 1, 6 ]
37-
max-nested-callbacks: [ 1, 4 ]
38-
# string can exceed 80 chars, but should not overflow github website :)
39-
max-len: [ 2, 120, 1000 ]
40-
new-cap: 2
41-
new-parens: 2
42-
# Postponed
43-
#newline-after-var: 2
44-
no-alert: 2
45-
no-array-constructor: 2
46-
no-bitwise: 2
47-
no-caller: 2
48-
#no-case-declarations: 2
49-
no-catch-shadow: 2
50-
no-cond-assign: 2
51-
no-console: 1
52-
no-constant-condition: 2
53-
#no-control-regex: 2
54-
no-debugger: 2
55-
no-delete-var: 2
56-
no-div-regex: 2
57-
no-dupe-args: 2
58-
no-dupe-keys: 2
59-
no-duplicate-case: 2
60-
no-else-return: 2
61-
# Tend to drop
62-
# no-empty: 1
63-
no-empty-character-class: 2
64-
no-empty-pattern: 2
65-
no-eq-null: 2
66-
no-eval: 2
67-
no-ex-assign: 2
68-
no-extend-native: 2
69-
no-extra-bind: 2
70-
no-extra-boolean-cast: 2
71-
no-extra-semi: 2
72-
no-fallthrough: 2
73-
no-floating-decimal: 2
74-
no-func-assign: 2
75-
# Postponed
76-
#no-implicit-coercion: [2, { "boolean": true, "number": true, "string": true } ]
77-
no-implied-eval: 2
78-
no-inner-declarations: 2
79-
no-invalid-regexp: 2
80-
no-irregular-whitespace: 2
81-
no-iterator: 2
82-
no-label-var: 2
83-
no-labels: 2
84-
no-lone-blocks: 2
85-
no-lonely-if: 2
86-
no-loop-func: 2
87-
no-mixed-requires: 2
88-
no-mixed-spaces-and-tabs: 2
89-
# Postponed
90-
#no-native-reassign: 2
91-
no-negated-in-lhs: 2
92-
# Postponed
93-
#no-nested-ternary: 2
94-
no-new: 2
95-
no-new-func: 2
96-
no-new-object: 2
97-
no-new-require: 2
98-
no-new-wrappers: 2
99-
no-obj-calls: 2
100-
no-octal: 2
101-
no-octal-escape: 2
102-
no-path-concat: 2
103-
no-proto: 2
104-
no-redeclare: 2
105-
# Postponed
106-
#no-regex-spaces: 2
107-
no-return-assign: 2
108-
no-self-compare: 2
109-
no-sequences: 2
110-
no-shadow: 2
111-
no-shadow-restricted-names: 2
112-
no-sparse-arrays: 2
113-
no-trailing-spaces: 2
114-
no-undef: 2
115-
no-undef-init: 2
116-
no-undefined: 2
117-
no-unexpected-multiline: 2
118-
no-unreachable: 2
119-
no-unused-expressions: 2
120-
no-unused-vars: 2
121-
no-use-before-define: 2
122-
no-void: 2
123-
no-with: 2
124-
object-curly-spacing: [ 2, always, { "objectsInObjects": true, "arraysInObjects": true } ]
125-
operator-assignment: 1
126-
# Postponed
127-
#operator-linebreak: [ 2, after ]
128-
semi: 2
129-
semi-spacing: 2
130-
space-before-function-paren: [ 2, { "anonymous": "always", "named": "never" } ]
131-
space-in-parens: [ 2, never ]
132-
space-infix-ops: 2
133-
space-unary-ops: 2
134-
# Postponed
135-
#spaced-comment: [ 1, always, { exceptions: [ '/', '=' ] } ]
136-
strict: [ 2, global ]
137-
quotes: [ 2, single, avoid-escape ]
138-
quote-props: [ 1, 'as-needed', { "keywords": true } ]
139-
radix: 2
140-
use-isnan: 2
141-
valid-typeof: 2
142-
yoda: [ 2, never, { "exceptRange": true } ]
20+
rules:
21+
camelcase: 0
22+
no-multi-spaces: 0

Diff for: .github/dependabot.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: daily
7+
8+
- package-ecosystem: npm
9+
directory: /
10+
schedule:
11+
interval: daily
12+
allow:
13+
- dependency-type: production

Diff for: .github/workflows/ci.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: '0 0 * * 3'
8+
9+
jobs:
10+
test:
11+
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
node-version: [ '18' ]
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Use Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
26+
- run: npm install
27+
28+
- name: Test
29+
run: npm test
30+
31+
- name: Upload coverage report to coveralls.io
32+
uses: coverallsapp/github-action@master
33+
with:
34+
github-token: ${{ secrets.GITHUB_TOKEN }}

Diff for: .gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
node_modules/
22
coverage/
3-
*.log
3+
dist/

Diff for: .npmignore

-6
This file was deleted.

Diff for: .travis.yml

-6
This file was deleted.

Diff for: CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
4.0.0 / 2023-12-06
2+
------------------
3+
4+
- Rewrite to ESM.
5+
- Remove `dist/` from repo (build on package publish).
6+
7+
18
3.0.3 / 2021-05-20
29
------------------
310

Diff for: Makefile

-39
This file was deleted.

Diff for: bower.json

-27
This file was deleted.

0 commit comments

Comments
 (0)