File tree Expand file tree Collapse file tree 3 files changed +43
-47
lines changed
Expand file tree Collapse file tree 3 files changed +43
-47
lines changed Original file line number Diff line number Diff line change 2020 },
2121 "description" : " mdast utility to parse markdown" ,
2222 "devDependencies" : {
23- "@types/node" : " ^22 .0.0" ,
23+ "@types/node" : " ^25 .0.0" ,
2424 "c8" : " ^10.0.0" ,
2525 "commonmark.json" : " ^0.31.0" ,
26- "esbuild" : " ^0.25 .0" ,
26+ "esbuild" : " ^0.27 .0" ,
2727 "gzip-size-cli" : " ^5.0.0" ,
2828 "hast-util-from-html" : " ^2.0.0" ,
2929 "hast-util-to-html" : " ^9.0.0" ,
3535 "terser" : " ^5.0.0" ,
3636 "type-coverage" : " ^2.0.0" ,
3737 "typescript" : " ^5.0.0" ,
38- "xo" : " ^0.60 .0"
38+ "xo" : " ^1.0 .0"
3939 },
4040 "exports" : {
4141 "development" : " ./dev/index.js" ,
9595 "strict" : true
9696 },
9797 "type" : " module" ,
98- "version" : " 2.0.2" ,
99- "xo" : {
100- "overrides" : [
101- {
102- "files" : [
103- " **/*.d.ts"
104- ],
105- "rules" : {
106- "@typescript-eslint/array-type" : [
107- " error" ,
108- {
109- "default" : " generic"
110- }
111- ],
112- "@typescript-eslint/ban-types" : [
113- " error" ,
114- {
115- "extendDefaults" : true
116- }
117- ],
118- "@typescript-eslint/consistent-type-definitions" : [
119- " error" ,
120- " interface"
121- ]
122- }
123- },
124- {
125- "files" : " test/**/*.js" ,
126- "rules" : {
127- "no-await-in-loop" : " off"
128- }
129- }
130- ],
131- "prettier" : true ,
132- "rules" : {
133- "complexity" : " off" ,
134- "max-depth" : " off" ,
135- "unicorn/prefer-at" : " off" ,
136- "unicorn/prefer-string-replace-all" : " off"
137- }
138- }
98+ "version" : " 2.0.2"
13999}
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ import {commonmark} from 'commonmark.json'
1010import { fromHtml } from 'hast-util-from-html'
1111import { toHtml } from 'hast-util-to-html'
1212import { toHast } from 'mdast-util-to-hast'
13- import { fromMarkdown } from 'mdast-util-from-markdown'
1413import { toString } from 'mdast-util-to-string'
14+ import { fromMarkdown } from 'mdast-util-from-markdown'
1515
1616test ( 'fromMarkdown' , async function ( t ) {
1717 await t . test ( 'should expose the public api' , async function ( ) {
@@ -210,7 +210,7 @@ test('fromMarkdown', async function (t) {
210210 {
211211 transforms : [
212212 function ( tree ) {
213- assert ( tree . children [ 0 ] . type === 'paragraph' )
213+ assert . ok ( tree . children [ 0 ] . type === 'paragraph' )
214214 tree . children [ 0 ] . children [ 0 ] . type = 'strong'
215215 }
216216 ]
@@ -1058,7 +1058,7 @@ test('commonmark', async function (t) {
10581058
10591059 const mdast = fromMarkdown ( input )
10601060 const hast = toHast ( mdast , { allowDangerousHtml : true } )
1061- assert ( hast && hast . type === 'root' , 'expected `root`' )
1061+ assert . ok ( hast && hast . type === 'root' , 'expected `root`' )
10621062 const actual = toHtml ( hast , { allowDangerousHtml : true } )
10631063
10641064 assert . equal (
Original file line number Diff line number Diff line change 1+ /**
2+ * @import {FlatXoConfig} from 'xo'
3+ */
4+
5+ /** @type {FlatXoConfig } */
6+ const xoConfig = [
7+ {
8+ name : 'default' ,
9+ prettier : true ,
10+ rules : {
11+ complexity : 'off' ,
12+ 'max-depth' : 'off' ,
13+ 'prefer-destructuring' : 'off' ,
14+ 'prefer-object-spread' : 'off' ,
15+ 'unicorn/prefer-at' : 'off' ,
16+ 'unicorn/prefer-string-raw' : 'off' ,
17+ 'unicorn/prefer-string-replace-all' : 'off'
18+ } ,
19+ space : true
20+ } ,
21+ {
22+ files : [ 'test/**/*.js' ] ,
23+ rules : { 'no-await-in-loop' : 'off' }
24+ } ,
25+ {
26+ files : [ '**/*.ts' ] ,
27+ rules : {
28+ '@typescript-eslint/array-type' : [ 'error' , { default : 'generic' } ] ,
29+ '@typescript-eslint/consistent-type-definitions' : [ 'error' , 'interface' ] ,
30+ '@typescript-eslint/no-restricted-types' : 'off' ,
31+ '@typescript-eslint/no-duplicate-type-constituents' : 'off'
32+ }
33+ }
34+ ]
35+
36+ export default xoConfig
You can’t perform that action at this time.
0 commit comments