-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from lifeomic/bootstrap
Bootstrap Repo
- Loading branch information
Showing
15 changed files
with
3,414 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module.exports = { | ||
extends: ['@lifeomic/standards'], | ||
overrides: [ | ||
// Set correct env for config files | ||
{ | ||
files: ['*.js'], | ||
env: { | ||
node: true, | ||
}, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
enforceSemanticCommits: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: PR Build & Test | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 12 | ||
- name: Build & Test | ||
run: | | ||
yarn install --frozen-lockfile | ||
yarn lint | ||
yarn test | ||
yarn build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 12 | ||
- name: Test | ||
run: | | ||
yarn install --frozen-lockfile | ||
yarn lint | ||
yarn test | ||
yarn build | ||
- name: Publish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.LIFEOMIC_NPM_TOKEN }} | ||
run: | | ||
npx semantic-release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
node_modules | ||
*.log | ||
dist | ||
.vscode | ||
coverage | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
# eslint-plugin-i18next | ||
This repository contains an ESLint plugin for validating usage of [`18next`](https://github.com/i18next/i18next). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const { execSync } = require('child_process'); | ||
const { unlinkSync } = require('fs'); | ||
const glob = require('glob'); | ||
|
||
const run = (cmd) => execSync(cmd, { stdio: 'inherit' }); | ||
|
||
run('rm -rf dist/'); | ||
|
||
run('yarn tsc'); | ||
|
||
for (const file of ['package.json', 'yarn.lock', 'README.md']) { | ||
run(`cp ${file} dist/`); | ||
} | ||
|
||
// Remove test files from output | ||
for (const file of glob.sync('dist/**/*.test.*')) { | ||
unlinkSync(file); | ||
} | ||
|
||
console.log('✔️ Successfully built library to dist folder'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module.exports = { | ||
preset: '@lifeomic/jest-config', | ||
testMatch: ['<rootDir>/**/*.test.ts'], | ||
collectCoverage: true, | ||
coverageThreshold: { | ||
global: { | ||
branches: 100, | ||
statements: 100, | ||
functions: 100, | ||
lines: 100, | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "@lifeomic/eslint-plugin-i18next", | ||
"version": "0.0.0", | ||
"description": "An ESLint plugin for validating i18next usage", | ||
"main": "index.js", | ||
"repository": "git@github.com:lifeomic/eslint-plugin-i18next.git", | ||
"author": "LifeOmic <development@lifeomic.com>", | ||
"license": "UNLICENSED", | ||
"scripts": { | ||
"lint": "eslint . && prettier --check .", | ||
"test": "jest", | ||
"build": "node build.js" | ||
}, | ||
"devDependencies": { | ||
"@lifeomic/eslint-config-standards": "^1.2.1", | ||
"@lifeomic/jest-config": "^1.0.2", | ||
"@lifeomic/typescript-config": "^1.0.1", | ||
"@types/eslint": "^7.28.1", | ||
"@types/jest": "^27.0.2", | ||
"eslint": "^7.32.0", | ||
"glob": "^7.2.0", | ||
"jest": "^27.3.1", | ||
"jest-circus": "^27.3.1", | ||
"prettier": "^2.4.1", | ||
"ts-jest": "^27.0.7", | ||
"typescript": "^4.4.4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
arrowParens: 'always', | ||
trailingComma: 'all', | ||
singleQuote: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module.exports = { | ||
branches: ['master'], | ||
plugins: [ | ||
['@semantic-release/commit-analyzer', { preset: 'conventionalcommits' }], | ||
['@semantic-release/npm', { pkgRoot: 'dist/' }], | ||
[ | ||
'@semantic-release/github', | ||
{ | ||
// Setting this to false disables the default behavior | ||
// of opening a GitHub issue when a release fails. | ||
// We have other methods of tracking these failures. | ||
failComment: false, | ||
}, | ||
], | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { placeholder } from './'; | ||
|
||
test('placeholder', () => { | ||
expect(placeholder).toBe('placeholder'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const placeholder = 'placeholder'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"extends": "@lifeomic/typescript-config", | ||
"exclude": ["node_modules"], | ||
"include": ["src"], | ||
"compilerOptions": { | ||
"target": "es2019", | ||
"module": "commonjs", | ||
"lib": ["ES2020"], | ||
"outDir": "./dist", | ||
"inlineSources": false, | ||
"inlineSourceMap": false, | ||
"esModuleInterop": false | ||
} | ||
} |
Oops, something went wrong.