Skip to content

Commit 38fd04c

Browse files
authored
Merge pull request #4 from skeate/sort-imports
style: sort imports with prettier
2 parents 26850d9 + 6071fd7 commit 38fd04c

File tree

11 files changed

+98
-18
lines changed

11 files changed

+98
-18
lines changed

.prettierrc

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
{
2-
"arrowParens": "always",
3-
"singleQuote": true,
4-
"useTabs": true,
5-
"trailingComma": "all",
6-
"printWidth": 80,
7-
"proseWrap": "always",
8-
"endOfLine": "lf",
9-
"semi": false
2+
"arrowParens": "always",
3+
"singleQuote": true,
4+
"useTabs": true,
5+
"trailingComma": "all",
6+
"printWidth": 80,
7+
"proseWrap": "always",
8+
"endOfLine": "lf",
9+
"semi": false,
10+
"importOrder": ["^[./]"],
11+
"importOrderSeparation": true,
12+
"importOrderSortSpecifiers": true,
13+
"plugins": ["@trivago/prettier-plugin-sort-imports"]
1014
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"fp-ts": "^2.13.1"
4848
},
4949
"devDependencies": {
50+
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
5051
"@types/jest": "^29.5.1",
5152
"commitizen": "^4.3.0",
5253
"cz-conventional-changelog": "^3.3.0",

pnpm-lock.yaml

Lines changed: 67 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/arbitrary.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { match } from '@simspace/matchers'
22
import * as fc from 'fast-check'
3-
import { pipe } from 'fp-ts/function'
43
import * as RA from 'fp-ts/ReadonlyArray'
5-
import { Atom, QuantifiedAtom, Term, Pattern } from './types'
4+
import { pipe } from 'fp-ts/function'
5+
6+
import { Atom, Pattern, QuantifiedAtom, Term } from './types'
67

78
const matchK = match.on('kind').w
89

src/base.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { match } from '@simspace/matchers'
22
import * as RA from 'fp-ts/ReadonlyArray'
3+
34
import {
45
Atom,
56
Char,

src/character-classes.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { pipe } from 'fp-ts/function'
2-
import { characterClass, and } from './base'
2+
3+
import { and, characterClass } from './base'
34
import { CharacterClass } from './types'
45

56
/**

src/combinators.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
import { pipe } from 'fp-ts/function'
21
import * as RA from 'fp-ts/ReadonlyArray'
2+
import { pipe } from 'fp-ts/function'
3+
34
import {
4-
or,
55
char,
66
characterClass,
7-
then,
8-
subgroup,
9-
sequence,
107
empty,
8+
or,
9+
sequence,
10+
subgroup,
11+
then,
1112
} from './base'
1213
import { digit } from './character-classes'
1314
import { Pattern, Term, TermSequence } from './types'

src/regex.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { match } from '@simspace/matchers'
2-
import { Atom, Pattern, QuantifiedAtom, Term } from './types'
3-
import { pipe } from 'fp-ts/function'
42
import * as O from 'fp-ts/Option'
53
import * as RNEA from 'fp-ts/ReadonlyNonEmptyArray'
4+
import { pipe } from 'fp-ts/function'
5+
6+
import { Atom, Pattern, QuantifiedAtom, Term } from './types'
67

78
const matchK = match.on('kind').w
89

test/arbitrary.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as fc from 'fast-check'
22
import { pipe } from 'fp-ts/function'
3+
34
import * as k from '../src'
45
import { arbitraryFromPattern } from '../src/arbitrary'
56

test/combinators.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as fc from 'fast-check'
2+
23
import * as k from '../src'
34

45
describe('combinators', () => {

0 commit comments

Comments
 (0)