Skip to content

Commit d39ff3a

Browse files
committed
Rewrite to ESM
1 parent 840a4a4 commit d39ff3a

File tree

16 files changed

+289
-495
lines changed

16 files changed

+289
-495
lines changed

.eslintrc.yml

Lines changed: 18 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -1,147 +1,22 @@
1-
env:
2-
node: true
3-
browser: false
4-
es6: false
1+
extends: standard
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 }
514

615
ignorePatterns:
7-
- coverage/
16+
- demo/
817
- dist/
9-
- rollup.config.js
10-
11-
rules:
12-
accessor-pairs: 2
13-
array-bracket-spacing: [ 2, "always", { "singleValue": true, "objectsInArrays": true, "arraysInArrays": true } ]
14-
block-scoped-var: 2
15-
block-spacing: 2
16-
brace-style: [ 2, '1tbs', { allowSingleLine: true } ]
17-
# Postponed
18-
#callback-return: 2
19-
comma-dangle: 2
20-
comma-spacing: 2
21-
comma-style: 2
22-
computed-property-spacing: [ 2, never ]
23-
consistent-this: [ 2, self ]
24-
consistent-return: 2
25-
# ? change to multi
26-
curly: [ 2, 'multi-line' ]
27-
dot-notation: 2
28-
eol-last: 2
29-
eqeqeq: 2
30-
func-style: [ 2, declaration ]
31-
# Postponed
32-
#global-require: 2
33-
guard-for-in: 2
34-
handle-callback-err: 2
18+
- benchmark/extra/
3519

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

.github/FUNDING.yml

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

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
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

.github/workflows/ci.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ jobs:
1313

1414
strategy:
1515
matrix:
16-
node-version: [ '14' ]
16+
node-version: [ '18' ]
1717

1818
steps:
19-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v4
2020

2121
- name: Use Node.js ${{ matrix.node-version }}
22-
uses: actions/setup-node@v2
22+
uses: actions/setup-node@v4
2323
with:
2424
node-version: ${{ matrix.node-version }}
2525

@@ -28,10 +28,7 @@ jobs:
2828
- name: Test
2929
run: npm test
3030

31-
- name: Create coverage report
32-
run: npm run report-coveralls
33-
3431
- name: Upload coverage report to coveralls.io
35-
uses: coverallsapp/github-action@v1.1.2
32+
uses: coverallsapp/github-action@master
3633
with:
3734
github-token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
.nyc_output
21
node_modules/
32
coverage/
3+
dist/

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
4.0.0 / 2023-12-03
2+
------------------
3+
4+
- Rewrite to ESM.
5+
- Remove `dist/` from repo (build on package publish).
6+
7+
18
3.0.1 / 2020-12-20
29
------------------
310

dist/markdown-it-mark.js

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

dist/markdown-it-mark.min.js

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

0 commit comments

Comments
 (0)