Skip to content

Commit db781b9

Browse files
committed
Initial commit of coding standards for this project
0 parents  commit db781b9

File tree

19 files changed

+7484
-0
lines changed

19 files changed

+7484
-0
lines changed

.github/workflows/npm_publish.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Publish npm Package
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v1
13+
14+
- uses: actions/setup-node@v3
15+
with:
16+
node-version: 18
17+
- run: yarn install --immutable
18+
- run: yarn build
19+
- run: yarn lint
20+
- run: yarn test
21+
22+
23+
publish-npm:
24+
needs: build
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v1
28+
29+
- uses: actions/setup-node@v3
30+
with:
31+
node-version: 18
32+
registry-url: https://registry.npmjs.org/
33+
- run: yarn install --immutable
34+
- run: yarn build
35+
36+
- run: npm publish --access public
37+
env:
38+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
39+

.github/workflows/pull_requests.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Build and run tests
2+
3+
on:
4+
pull_request:
5+
types: [assigned, opened, synchronize, reopened]
6+
# Allows you to run this workflow manually from the Actions tab
7+
workflow_dispatch:
8+
workflow_call:
9+
secrets:
10+
npm_token:
11+
required: true
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v1
19+
20+
- uses: actions/setup-node@v3
21+
with:
22+
node-version: 18
23+
- run: yarn install --immutable
24+
- run: yarn build
25+
- run: yarn lint
26+
- run: yarn test
27+

.gitignore

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Custom
2+
.transpiled
3+
.eslintcache
4+
5+
# TypeScript incremental compilation cache
6+
*.tsbuildinfo
7+
8+
# Stock
9+
*.seed
10+
*.log
11+
*.csv
12+
*.dat
13+
*.out
14+
*.pid
15+
*.gz
16+
*.orig
17+
18+
work
19+
/build
20+
pids
21+
logs
22+
results
23+
coverage
24+
lib-cov
25+
html-report
26+
xunit.xml
27+
node_modules
28+
npm-debug.log
29+
30+
.project
31+
.idea
32+
.settings
33+
.iml
34+
*.sublime-workspace
35+
*.sublime-project
36+
37+
.DS_Store*
38+
ehthumbs.db
39+
Icon?
40+
Thumbs.db
41+
.AppleDouble
42+
.LSOverride
43+
.Spotlight-V100
44+
.Trashes
45+
46+
.yarn/*
47+
!.yarn/patches
48+
!.yarn/plugins
49+
!.yarn/releases
50+
!.yarn/sdks
51+
!.yarn/versions
52+
53+
.node_repl_history
54+
55+
# TypeScript incremental compilation cache
56+
*.tsbuildinfo
57+
58+
# Added by coconfig
59+
.eslintignore
60+
.npmignore
61+
tsconfig.json
62+
tsconfig.build.json
63+
jest.config.js
64+
.prettierrc.js
65+
.eslintrc.js

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
yarn lint-staged

.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Lines changed: 541 additions & 0 deletions
Large diffs are not rendered by default.

.yarn/releases/yarn-3.2.4.cjs

Lines changed: 801 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
nodeLinker: node-modules
2+
3+
plugins:
4+
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
5+
spec: "@yarnpkg/plugin-interactive-tools"
6+
7+
yarnPath: .yarn/releases/yarn-3.2.4.cjs

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# @openapi-typescript-infra/coconfig
2+
3+
![main CI](https://github.com/openapi-typescript-infra/coconfig/actions/workflows/npm_publish.yml/badge.svg)
4+
5+
Default Node.js configuration files for OpenAPI Typescript projects. Uses [coconfig](/gas-buddy/coconfig) to create a pile of configuration files.

__tests__/index.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { config } from '../src';
2+
3+
test('index', () => {
4+
expect(config).toBeTruthy();
5+
});

coconfig.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { config } from './src';
2+
3+
// During the initial creation of tsconfig. sythentic default imports are not allowed.
4+
// This is here so we can handle both pre and post initial creation
5+
const tsconfig = config['tsconfig.json'] || (config as any).default['tsconfig.json'];
6+
7+
tsconfig.configuration.compilerOptions.target = 'ES2019';
8+
9+
export default config;

0 commit comments

Comments
 (0)