Skip to content

Commit cefe5cd

Browse files
chore: init monorepo config (#57)
1 parent 182afef commit cefe5cd

File tree

64 files changed

+1951
-2414
lines changed

Some content is hidden

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

64 files changed

+1951
-2414
lines changed

.eslintrc.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
module.exports = {
2+
extends: ['@sourcegraph/eslint-config'],
3+
env: {
4+
node: true,
5+
es6: true,
6+
},
7+
parserOptions: {
8+
ecmaVersion: 2018,
9+
sourceType: 'module',
10+
ecmaFeatures: {
11+
jsx: true,
12+
},
13+
EXPERIMENTAL_useSourceOfProjectReferenceRedirect: true,
14+
project: ['./tsconfig.eslint.json', './tsconfig.json', './packages/*/tsconfig.json'],
15+
allowAutomaticSingleRunInference: true,
16+
tsconfigRootDir: __dirname,
17+
warnOnUnsupportedTypeScriptVersion: false,
18+
},
19+
settings: {
20+
react: {
21+
version: '*',
22+
},
23+
},
24+
rules: {
25+
'no-sync': 'off',
26+
},
27+
}

.eslintrc.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/lsif.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ jobs:
55
lsif-ts:
66
runs-on: ubuntu-latest
77
container: sourcegraph/lsif-node
8+
strategy:
9+
matrix:
10+
root:
11+
- packages/codemod
812
steps:
913
- uses: actions/checkout@v2
1014
- name: Setup Node.js
@@ -13,7 +17,18 @@ jobs:
1317
node-version: 14
1418
- name: Install dependencies
1519
run: yarn --ignore-engines --ignore-scripts
20+
1621
- name: Generate LSIF data
22+
working-directory: ${{ matrix.root }}
1723
run: lsif-tsc -p .
18-
- name: Upload LSIF data
19-
run: src lsif upload -github-token=${{ secrets.GITHUB_TOKEN }}
24+
25+
- name: Upload lsif-tsc dump to Cloud
26+
working-directory: ${{ matrix.root }}
27+
run: src lsif upload -github-token='${{ secrets.GITHUB_TOKEN }}' -no-progress
28+
env:
29+
SRC_ENDPOINT: https://sourcegraph.com/
30+
- name: Upload lsif-tsc dump to Dogfood
31+
working-directory: ${{ matrix.root }}
32+
run: src lsif upload -github-token='${{ secrets.GITHUB_TOKEN }}' -no-progress || true
33+
env:
34+
SRC_ENDPOINT: https://k8s.sgdev.org/

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
run: yarn install
1515
- name: Run build
1616
run: yarn build
17-
- name: Run prettier
18-
run: yarn prettier-check
19-
- name: Run eslint
20-
run: yarn eslint
17+
- name: Run format
18+
run: yarn format:check
19+
- name: Run lint
20+
run: yarn lint
2121
- name: Run tests
2222
run: yarn test

.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,9 @@
1515
# Mac OS X
1616
.DS_Store
1717

18-
# Sublime
19-
*.sublime-project
20-
*.sublime-workspace
21-
2218
dist
2319
node_modules
2420
npm-debug.log
2521
yarn-error.log
2622
.eslintcache
23+
*.tsbuildinfo

.prettierignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
dist
2-
fixtures
1+
**/fixtures/**/*
2+
**/dist
3+
**/coverage
4+
**/.vscode
5+
**/.vs

README.md

Lines changed: 1 addition & 1 deletion

babel.config.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

jest.config.base.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import type { InitialOptionsTsJest } from 'ts-jest'
2+
3+
const config: InitialOptionsTsJest = {
4+
preset: 'ts-jest',
5+
globals: {
6+
'ts-jest': {
7+
isolatedModules: true,
8+
},
9+
},
10+
testEnvironment: 'node',
11+
roots: ['<rootDir>/src'],
12+
modulePaths: ['node_modules', '<rootDir>/src'],
13+
modulePathIgnorePatterns: ['fixtures', 'dist'],
14+
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
15+
}
16+
17+
// eslint-disable-next-line import/no-default-export
18+
export default config

jest.config.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)