Skip to content

Commit 736c450

Browse files
committed
Update linting & formatting settings
1 parent 732f328 commit 736c450

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1542
-787
lines changed

.editorconfig

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,9 @@ root = true
44
[*]
55
charset = utf-8
66
end_of_line = lf
7-
indent_size = 4
87
indent_style = tab
98
insert_final_newline = true
109
trim_trailing_whitespace = true
1110

1211
[*.md]
1312
trim_trailing_whitespace = false
14-
15-
[*.{json,yml,yaml}]
16-
indent_size = 2
17-
indent_style = space

.eslintrc.cjs

Lines changed: 10 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ const config = {
1515
},
1616
env: { browser: true },
1717
settings: {
18-
'import-sorting/known-framework':
19-
/^((@sveltejs|svelte)(\/|-preprocess|$)|(@?sanity(\/|$)))/.source,
20-
'import-sorting/known-first-party': /^\$(app|lib)(\/|$)/.source,
18+
'import-sorting/framework-patterns': [
19+
/^@?portabletext(\/|$)/.source,
20+
/^@?sanity(\/|$)/.source,
21+
/^(@sveltejs|svelte(\/|-preprocess|$))/.source,
22+
],
23+
'import-sorting/internal-patterns': /^\$(app|lib)(\/|$)/.source,
2124
},
2225
rules: {
2326
/**
@@ -33,47 +36,6 @@ const config = {
3336

3437
'import/no-extraneous-dependencies': 'off',
3538
'import/order': 'off',
36-
// 'import/order': [
37-
// 'error',
38-
// {
39-
// alphabetize: {
40-
// caseInsensitive: true,
41-
// order: 'asc',
42-
// },
43-
// groups: [
44-
// 'builtin',
45-
// 'external',
46-
// 'internal',
47-
// 'parent',
48-
// ['sibling', 'index'],
49-
// ],
50-
// 'newlines-between': 'always',
51-
// pathGroups: [
52-
// {
53-
// pattern:
54-
// '{@sveltejs/**,svelte/**,svelte?(-preprocess),@sanity/**,sanity/**,sanity}',
55-
// group: 'builtin',
56-
// position: 'after',
57-
// },
58-
// {
59-
// pattern: '$?(app|lib)/**',
60-
// group: 'internal',
61-
// position: 'after',
62-
// },
63-
// {
64-
// pattern: '*.+(css)',
65-
// group: 'index',
66-
// position: 'after',
67-
// patternOptions: {
68-
// matchBase: true,
69-
// },
70-
// },
71-
// ],
72-
// pathGroupsExcludedImportTypes: ['svelte'],
73-
// },
74-
// ],
75-
76-
'import-sorting/order': 'error',
7739

7840
'prefer-let/prefer-let': 'off',
7941

@@ -104,6 +66,10 @@ const config = {
10466
project: path.resolve('studio', 'tsconfig.json'),
10567
},
10668
rules: {
69+
'@typescript-eslint/ban-types': 'off',
70+
'@typescript-eslint/lines-between-class-members': 'off',
71+
'@typescript-eslint/padding-line-between-statements': 'off',
72+
10773
'import/extensions': ['off'],
10874
},
10975
},

actions/read/__tests__/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { readFile, writeFile } from 'node:fs/promises'
44

55
import * as core from '@actions/core'
66
import * as github from '@actions/github'
7-
import { it, describe, expect, afterEach, beforeEach, vi } from 'vitest'
7+
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
88

99
import { read } from '../src/index.js'
1010

actions/read/jsconfig.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"compilerOptions": {
3-
"module": "nodenext",
4-
"moduleResolution": "nodenext",
5-
"allowJs": true,
6-
"esModuleInterop": true,
7-
"target": "es2022",
8-
"skipLibCheck": true
9-
},
10-
"include": ["src"]
2+
"compilerOptions": {
3+
"module": "nodenext",
4+
"moduleResolution": "nodenext",
5+
"allowJs": true,
6+
"esModuleInterop": true,
7+
"target": "es2022",
8+
"skipLibCheck": true
9+
},
10+
"include": ["src"]
1111
}

actions/read/package.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
{
2-
"name": "read",
3-
"version": "1.0.0",
4-
"private": true,
5-
"type": "module",
6-
"exports": {
7-
".": "./dist/index.js"
8-
},
9-
"main": "dist/index.js",
10-
"scripts": {
11-
"build": "ncc build src/index.js",
12-
"test": "vitest run"
13-
},
14-
"dependencies": {
15-
"@actions/core": "1.10.1",
16-
"@actions/github": "6.0.0",
17-
"node-isbn": "1.6.1"
18-
},
19-
"devDependencies": {
20-
"@vercel/ncc": "0.38.1",
21-
"vitest": "1.1.0"
22-
}
2+
"name": "read",
3+
"version": "1.0.0",
4+
"private": true,
5+
"type": "module",
6+
"exports": {
7+
".": "./dist/index.js"
8+
},
9+
"main": "dist/index.js",
10+
"scripts": {
11+
"build": "ncc build src/index.js",
12+
"test": "vitest run"
13+
},
14+
"dependencies": {
15+
"@actions/core": "1.10.1",
16+
"@actions/github": "6.0.0",
17+
"node-isbn": "1.6.1"
18+
},
19+
"devDependencies": {
20+
"@vercel/ncc": "0.38.1",
21+
"vitest": "1.1.0"
22+
}
2323
}

actions/read/src/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,7 @@ export async function read() {
7575
.provider(providers)
7676
.resolve(bookIsbn)
7777
.catch((error) => {
78-
throw new Error(
79-
`Book (${bookIsbn}) not found. ${error.message}`,
80-
)
78+
throw new Error(`Book (${bookIsbn}) not found. ${error.message}`)
8179
})
8280

8381
newBook = checkBook(newBook, {

package.json

Lines changed: 53 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,55 @@
11
{
2-
"name": "tidaltheory-monorepo",
3-
"version": "0.0.0",
4-
"private": true,
5-
"type": "module",
6-
"workspaces": [
7-
"actions/*",
8-
"studio",
9-
"www"
10-
],
11-
"scripts": {
12-
"build:action": "pnpm run --dir actions/read build",
13-
"build:site": "npm run -w www build",
14-
"dev:cms": "npm run -w studio dev",
15-
"dev:site": "pnpm run --dir studio typegen && npm run -w www dev",
16-
"pnpm:build:site": "pnpm run --dir www build",
17-
"pnpm:dev:cms": "pnpm run --dir studio dev",
18-
"pnpm:dev:site": "pnpm run --dir www dev",
19-
"prepare": "husky install",
20-
"test": "pnpm run --dir actions/read test"
21-
},
22-
"lint-staged": {
23-
"*.css": [
24-
"stylelint --config www/stylelint.config.cjs --fix",
25-
"prettier --write"
26-
],
27-
"**/!(dist)/*.{js,ts,tsx}": [
28-
"eslint --fix",
29-
"prettier --write"
30-
],
31-
"*.svelte": [
32-
"eslint --fix",
33-
"prettier --write"
34-
],
35-
"package.json": "prettier --write"
36-
},
37-
"devDependencies": {
38-
"@zazen/eslint-config": "6.7.0",
39-
"@zazen/prettier-config": "1.1.1",
40-
"@zazen/stylelint-config": "4.0.1",
41-
"eslint": "8.56.0",
42-
"eslint-plugin-svelte": "2.35.1",
43-
"husky": "8.0.3",
44-
"lint-staged": "15.2.0",
45-
"prettier": "3.3.2",
46-
"prettier-plugin-packagejson": "2.5.0",
47-
"prettier-plugin-svelte": "3.2.4",
48-
"prettier-plugin-tailwindcss": "0.6.5",
49-
"stylelint": "16.12.0",
50-
"typescript": "5.3.3"
51-
},
52-
"packageManager": "pnpm@8.13.1",
53-
"engines": {
54-
"pnpm": "^8.0.0"
55-
}
2+
"name": "tidaltheory-monorepo",
3+
"version": "0.0.0",
4+
"private": true,
5+
"type": "module",
6+
"workspaces": [
7+
"actions/*",
8+
"studio",
9+
"www"
10+
],
11+
"scripts": {
12+
"build:action": "pnpm run --dir actions/read build",
13+
"build:site": "npm run -w www build",
14+
"dev:cms": "npm run -w studio dev",
15+
"dev:site": "pnpm run --dir studio typegen && npm run -w www dev",
16+
"pnpm:build:site": "pnpm run --dir www build",
17+
"pnpm:dev:cms": "pnpm run --dir studio dev",
18+
"pnpm:dev:site": "pnpm run --dir www dev",
19+
"prepare": "husky install",
20+
"test": "pnpm run --dir actions/read test"
21+
},
22+
"lint-staged": {
23+
"*.css": [
24+
"stylelint --config www/stylelint.config.cjs --fix",
25+
"prettier --write"
26+
],
27+
"**/!(dist)/*.{js,ts,tsx}": [
28+
"eslint --fix",
29+
"prettier --write"
30+
],
31+
"*.svelte": [
32+
"eslint --fix",
33+
"prettier --write"
34+
],
35+
"package.json": "prettier --write"
36+
},
37+
"devDependencies": {
38+
"@zazen/eslint-config": "6.10.0",
39+
"@zazen/prettier-config": "1.1.1",
40+
"@zazen/stylelint-config": "4.0.1",
41+
"eslint": "8.57.1",
42+
"eslint-plugin-svelte": "2.35.1",
43+
"husky": "8.0.3",
44+
"lint-staged": "15.2.0",
45+
"prettier": "3.4.2",
46+
"prettier-plugin-svelte": "3.3.3",
47+
"prettier-plugin-tailwindcss": "0.6.11",
48+
"stylelint": "16.12.0",
49+
"typescript": "5.3.3"
50+
},
51+
"packageManager": "pnpm@8.13.1",
52+
"engines": {
53+
"pnpm": "^8.0.0"
54+
}
5655
}

0 commit comments

Comments
 (0)