-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGE: this version does not work in Studio V2
- Loading branch information
Showing
20 changed files
with
25,089 additions
and
6,147 deletions.
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,7 @@ | ||
.eslintrc.js | ||
commitlint.config.js | ||
lib | ||
lint-staged.config.js | ||
rollup.config.js | ||
node_modules | ||
*.js |
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,41 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
node: false, | ||
}, | ||
extends: [ | ||
'sanity/react', // must come before sanity/typescript | ||
'sanity/typescript', | ||
'plugin:prettier/recommended', | ||
], | ||
overrides: [ | ||
{ | ||
files: ['*.{ts,tsx}'], | ||
}, | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
project: './tsconfig.json', | ||
}, | ||
plugins: ['prettier'], | ||
rules: { | ||
'@typescript-eslint/explicit-function-return-type': 0, | ||
'@typescript-eslint/no-shadow': 'error', | ||
'@typescript-eslint/no-unused-vars': 1, | ||
'no-shadow': 'off', | ||
'react/display-name': 0, | ||
'react/jsx-no-bind': 0, | ||
}, | ||
settings: { | ||
'import/ignore': ['\\.css$', '.*node_modules.*', '.*:.*'], | ||
'import/resolver': { | ||
node: { | ||
paths: ['src'], | ||
extensions: ['.js', '.jsx', '.ts', '.tsx'], | ||
}, | ||
}, | ||
}, | ||
}; |
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,42 +1,27 @@ | ||
name: CI | ||
on: [push] | ||
on: | ||
- push | ||
- pull_request | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
test: | ||
runs-on: ${{ matrix.platform }} | ||
name: Node.js ${{ matrix.node-version }} / ${{ matrix.platform }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [ubuntu-latest, macos-latest, windows-latest] | ||
node-version: | ||
- 16 | ||
steps: | ||
- name: Begin CI... | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Node 12 | ||
uses: actions/setup-node@v1 | ||
- name: Set git to use LF | ||
run: | | ||
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
|
||
- name: Use cached node_modules | ||
uses: actions/cache@v1 | ||
with: | ||
path: node_modules | ||
key: nodeModules-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
nodeModules- | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
env: | ||
CI: true | ||
|
||
- name: Lint | ||
run: yarn lint | ||
env: | ||
CI: true | ||
|
||
- name: Test | ||
run: yarn test --ci --coverage --maxWorkers=2 | ||
env: | ||
CI: true | ||
|
||
- name: Build | ||
run: yarn build | ||
env: | ||
CI: true | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm install | ||
- run: npm run lint | ||
- run: npm run build | ||
#- run: npm test |
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,7 +1,10 @@ | ||
.DS_Store | ||
package-lock.json | ||
yarn.lock | ||
node_modules | ||
example/node_modules | ||
*.log | ||
.cache | ||
dist | ||
lib/ | ||
.idea/ | ||
.parcel-cache |
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx --no -- commitlint --edit "" |
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
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,5 +1,4 @@ | ||
.DS_Store | ||
/src | ||
/example | ||
/node_modules | ||
/test |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,3 @@ | ||
module.exports = { | ||
extends: ['@commitlint/config-conventional'], | ||
} |
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,4 @@ | ||
module.exports = { | ||
'**/*.{js,jsx}': ['eslint'], | ||
'**/*.{ts,tsx}': ['eslint', () => 'tsc --noEmit'], | ||
} |
Oops, something went wrong.