Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
PinkChampagne17 committed Jun 29, 2024
1 parent d7f0036 commit 2d2e024
Show file tree
Hide file tree
Showing 47 changed files with 4,893 additions and 8,067 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true

[*.{css,html,js,jsx,cjs,mjs,ts,tsx,mts,cts,vue}]
[*.{css,html,js,jsx,cjs,mjs,ts,tsx,mts,cts}]
indent_size = 2

[*.{json,json5,yaml,yml}]
Expand Down
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
* text=auto eol=lf
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
version: 9

- uses: actions/setup-node@v3
with:
Expand All @@ -23,5 +23,5 @@ jobs:
- name: Install dependencies
run: pnpm install

- name: Check
run: pnpm run check
- name: Build
run: pnpm run build
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
node_modules
.eslintcache
node_modules

.nx/cache
.nx/workspace-data
3 changes: 0 additions & 3 deletions .prettierignore

This file was deleted.

3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["biomejs.biome"]
}
10 changes: 9 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
{
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"cSpell.words": ["autofix", "greasemonkey", "miao", "pinkchampagne"],
"eslint.experimental.useFlatConfig": true,
"eslint.workingDirectories": [
{
"mode": "auto"
Expand Down
23 changes: 23 additions & 0 deletions biome.base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"formatter": {
"enabled": true
},
"json": {
"formatter": {
"indentStyle": "space"
}
},
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true,
"defaultBranch": "main"
}
}
7 changes: 7 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"extends": ["./biome.base.json"],
"formatter": {
"ignore": ["packages"]
}
}
5 changes: 0 additions & 5 deletions lerna.json

This file was deleted.

23 changes: 20 additions & 3 deletions nx.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,35 @@
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"defaultBase": "main",
"tasksRunnerOptions": {
"default": {
"runner": "nx/tasks-runners/default"
}
},
"targetDefaults": {
"build": {
"dependsOn": ["^build"]
"cache": true,
"dependsOn": ["^build", "format", "lint", "test"],
"inputs": [
"{projectRoot}/**/*",
"!{projectRoot}/dist/**/*",
"!{projectRoot}/test/**/*"
],
"outputs": ["{projectRoot}/dist/**/*"]
},
"format": {
"cache": true,
"dependsOn": ["lint"],
"inputs": ["{projectRoot}/**/*", "!{projectRoot}/dist/**/*"],
"outputs": ["{projectRoot}/**/*", "!{projectRoot}/dist/**/*"]
},
"lint": {
"dependsOn": ["build"]
"cache": false
},
"test": {
"dependsOn": ["lint"]
"cache": true,
"dependsOn": ["lint"],
"inputs": ["{projectRoot}/**/*", "!{projectRoot}/dist/**/*"]
}
}
}
26 changes: 11 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
{
"private": "true",
"workspaces": [
"packages/*"
],
"packageManager": "[email protected]",
"workspaces": ["packages/*"],
"packageManager": "[email protected]",
"scripts": {
"build": "lerna run build",
"check": "prettier . --check && lerna run lint,test",
"lint": "prettier . --check && lerna run lint",
"lint:fix": "prettier . --write && lerna run lint:fix",
"test": "lerna run test"
"build": "nx run-many -t build",
"format": "biome format . && nx run-many -t format",
"format:fix": "biome format . --write && nx run-many -t format:fix",
"lint": "nx run-many -t lint",
"lint:fix": "nx run-many -t lint:fix",
"test": "nx run-many -t test"
},
"devDependencies": {
"lerna": "^7.1.4",
"prettier": "^3.0.0"
"@biomejs/biome": "1.8.3",
"nx": "19.3.2"
},
"pnpm": {
"patchedDependencies": {
"[email protected]": "patches/[email protected]"
},
"overrides": {
"has": "npm:@nolyfill/has@latest"
"is-core-module": "npm:@nolyfill/is-core-module@^1"
}
}
}
6 changes: 0 additions & 6 deletions packages/ends-with-miao/babel.config.js

This file was deleted.

4 changes: 4 additions & 0 deletions packages/ends-with-miao/biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"extends": ["../../biome.base.json"]
}
11 changes: 2 additions & 9 deletions packages/ends-with-miao/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
// @ts-check
const { buildConfig } = require("eslint-config-ewm");
import { buildConfig } from "eslint-config-pcp";

/** @type {import("eslint").Linter.FlatConfig[]} */
module.exports = [
...buildConfig({
typescript: {
files: ["src/**/*.ts"],
},
}),
];
export default await buildConfig();
39 changes: 25 additions & 14 deletions packages/ends-with-miao/package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,38 @@
{
"name": "ends-with-miao",
"type": "module",
"version": "1.0.0",
"private": true,
"description": "",
"author": "pinkchampagne",
"license": "AGPL-3.0",
"private": true,
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"scripts": {
"build": "rimraf dist && tsc -p ./tsconfig.json",
"test": "jest",
"test:watch": "jest --watchAll"
"build": "rimraf dist && tsc -p ./tsconfig.build.json",
"format": "biome format .",
"format:fix": "biome format . --write",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"test": "vitest --run",
"test:watch": "vitest"
},
"devDependencies": {
"@babel/core": "^7.21.4",
"@babel/preset-env": "^7.21.4",
"@babel/preset-typescript": "^7.21.4",
"@types/jest": "^29.5.1",
"babel-jest": "^29.5.0",
"eslint-config-ewm": "workspace:*",
"jest": "^29.5.0",
"rimraf": "^5.0.1",
"typescript": "^5.0.4",
"tsconfig": "workspace:*"
"@biomejs/biome": "1.8.3",
"@pinkchampagne/tsconfig": "^1.0.0",
"eslint": "^9.6.0",
"eslint-config-pcp": "2.0.0-beta.6",
"rimraf": "^5.0.7",
"typescript": "^5.5.2",
"vitest": "^1.6.0"
}
}
2 changes: 2 additions & 0 deletions packages/ends-with-miao/test/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { expect, test } from "vitest";

import { endsWithMiao } from "../src";

test("test ends-with-miao", () => {
Expand Down
9 changes: 9 additions & 0 deletions packages/ends-with-miao/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "@pinkchampagne/tsconfig",
"compilerOptions": {
"declaration": true,
"declarationMap": true,
"outDir": "dist"
},
"include": ["src"]
}
9 changes: 2 additions & 7 deletions packages/ends-with-miao/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
{
"extends": "tsconfig",
"include": ["src"],
"compilerOptions": {
"declarationMap": true,
"outDir": "dist",
"types": ["@types/jest"]
}
"extends": "@pinkchampagne/tsconfig",
"include": ["src", "test"]
}
1 change: 0 additions & 1 deletion packages/eslint-config-ewm/.gitignore

This file was deleted.

20 changes: 0 additions & 20 deletions packages/eslint-config-ewm/eslint.config.js

This file was deleted.

47 changes: 0 additions & 47 deletions packages/eslint-config-ewm/package.json

This file was deleted.

43 changes: 0 additions & 43 deletions packages/eslint-config-ewm/src/configs/import.ts

This file was deleted.

Loading

0 comments on commit 2d2e024

Please sign in to comment.