|
1 | | -import { Vitest } from "@nikovirtala/projen-vitest"; |
2 | | -import { cdk } from "projen"; |
3 | | -import { GithubCredentials } from "projen/lib/github"; |
4 | | -import { NodePackageManager } from "projen/lib/javascript"; |
5 | | -import { Biome } from "./src"; |
6 | | -import { createTypes } from "./src/schema"; |
| 1 | +import { Vitest } from '@nikovirtala/projen-vitest' |
| 2 | +import { cdk } from 'projen' |
| 3 | +import { GithubCredentials } from 'projen/lib/github' |
| 4 | +import { NodePackageManager } from 'projen/lib/javascript' |
| 5 | +import { Biome } from './src' |
| 6 | +import { createTypes } from './src/schema' |
7 | 7 |
|
8 | 8 | const project = new cdk.JsiiProject({ |
9 | | - author: "Juho Saarinen", |
10 | | - authorAddress: "juho.saarinen@gmail.com", |
11 | | - defaultReleaseBranch: "main", |
12 | | - jsiiVersion: "~5.8.0", |
13 | | - license: "MIT", |
14 | | - name: "projen-biome", |
15 | | - projenrcTs: true, |
16 | | - repositoryUrl: "https://github.com/Hi-Fi/projen-biome.git", |
17 | | - packageManager: NodePackageManager.NPM, |
18 | | - renovatebot: true, |
19 | | - depsUpgradeOptions: { |
20 | | - workflow: false, |
21 | | - }, |
22 | | - bundledDeps: ["@biomejs/biome"], |
23 | | - deps: ["@biomejs/biome"], |
24 | | - devDeps: ["@nikovirtala/projen-vitest", "json-schema-to-typescript"], |
25 | | - peerDeps: ["projen", "constructs"], |
26 | | - jest: false, |
27 | | - // Use biome (this project) instead of eslint and prettier |
28 | | - eslint: false, |
29 | | - prettier: false, |
30 | | - projenCredentials: GithubCredentials.fromPersonalAccessToken({ |
31 | | - secret: "GITHUB_TOKEN", |
32 | | - }), |
33 | | - |
34 | | - // deps: [], /* Runtime dependencies of this module. */ |
35 | | - // description: undefined, /* The description is just a string that helps people understand the purpose of the package. */ |
36 | | - // devDeps: [], /* Build dependencies for this module. */ |
37 | | - // packageName: undefined, /* The "name" in package.json. */ |
38 | | -}); |
| 9 | + author: 'Juho Saarinen', |
| 10 | + authorAddress: 'juho.saarinen@gmail.com', |
| 11 | + defaultReleaseBranch: 'main', |
| 12 | + jsiiVersion: '~5.8.0', |
| 13 | + license: 'MIT', |
| 14 | + name: 'projen-biome', |
| 15 | + projenrcTs: true, |
| 16 | + repositoryUrl: 'https://github.com/Hi-Fi/projen-biome.git', |
| 17 | + packageManager: NodePackageManager.NPM, |
| 18 | + renovatebot: true, |
| 19 | + depsUpgradeOptions: { |
| 20 | + workflow: false, |
| 21 | + }, |
| 22 | + bundledDeps: ['@biomejs/biome'], |
| 23 | + deps: ['@biomejs/biome'], |
| 24 | + devDeps: ['@nikovirtala/projen-vitest', 'json-schema-to-typescript', 'memfs'], |
| 25 | + peerDeps: ['projen', 'constructs'], |
| 26 | + jest: false, |
| 27 | + // Use biome (this project) instead of eslint and prettier |
| 28 | + eslint: false, |
| 29 | + prettier: false, |
| 30 | + projenCredentials: GithubCredentials.fromPersonalAccessToken({ |
| 31 | + secret: 'GITHUB_TOKEN', |
| 32 | + }), |
| 33 | + |
| 34 | + // deps: [], /* Runtime dependencies of this module. */ |
| 35 | + // description: undefined, /* The description is just a string that helps people understand the purpose of the package. */ |
| 36 | + // devDeps: [], /* Build dependencies for this module. */ |
| 37 | + // packageName: undefined, /* The "name" in package.json. */ |
| 38 | +}) |
39 | 39 |
|
40 | 40 | // const typesTask = project.addTask("parse-biome-types", { |
41 | 41 | // exec: "npx --package=json-schema-to-typescript json2ts --input node_modules/@biomejs/biome/configuration_schema.json --output src/biome-configuration.ts", |
42 | 42 | // }); |
43 | 43 |
|
44 | 44 | // project.defaultTask?.spawn(typesTask); |
45 | 45 |
|
46 | | -new Vitest(project); |
| 46 | +new Vitest(project) |
47 | 47 | new Biome(project, { |
48 | | - formatter: true, |
49 | | - organizeImports: true, |
50 | | - overrides: { |
51 | | - files: { |
52 | | - ignore: ["src/biome-configuration.ts"], |
53 | | - }, |
54 | | - }, |
55 | | -}); |
| 48 | + formatter: true, |
| 49 | + organizeImports: true, |
| 50 | + overrides: { |
| 51 | + files: { |
| 52 | + ignore: ['src/biome-configuration.ts', '__mocks__'], |
| 53 | + }, |
| 54 | + }, |
| 55 | +}) |
| 56 | + |
| 57 | +project.npmignore?.addPatterns('__mocks__') |
56 | 58 |
|
57 | 59 | project.postSynthesize = async () => { |
58 | | - await createTypes(); |
59 | | -}; |
| 60 | + await createTypes() |
| 61 | +} |
60 | 62 |
|
61 | | -project.synth(); |
| 63 | +project.synth() |
0 commit comments