-
Notifications
You must be signed in to change notification settings - Fork 2
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 #2 from manifoldco/dangodev/react-select
react-select-zero
- Loading branch information
Showing
20 changed files
with
19,404 additions
and
12 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,60 @@ | ||
module.exports = { | ||
extends: [ | ||
'airbnb', | ||
'plugin:@typescript-eslint/recommended', | ||
'prettier/@typescript-eslint', | ||
'plugin:react/recommended', | ||
'plugin:import/errors', | ||
'plugin:import/warnings', | ||
'plugin:import/typescript', | ||
], | ||
plugins: ['@typescript-eslint', 'react', 'react-hooks', 'prettier'], | ||
env: { | ||
browser: true, | ||
node: true, | ||
jest: true, | ||
es6: true, | ||
}, | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
jsx: true, | ||
ecmaVersion: 2018, | ||
sourceType: 'module', | ||
}, | ||
rules: { | ||
'@typescript-eslint/camelcase': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/explicit-member-accessibility': 'off', | ||
'@typescript-eslint/no-unused-vars': 'off', // compiler catches these well enough | ||
'arrow-parens': 'off', // let Prettier handle parens | ||
camelcase: 'off', // underscores are a thing | ||
'comma-dangle': [ | ||
'error', | ||
{ | ||
arrays: 'always-multiline', | ||
exports: 'never', | ||
functions: 'never', // function commas are weird | ||
imports: 'always-multiline', | ||
objects: 'always-multiline', | ||
}, | ||
], | ||
curly: ['error', 'all'], | ||
'function-paren-newline': 'off', // let Prettier handle line breaks | ||
'max-len': 'off', // let Prettier handle line wrapping | ||
'implicit-arrow-linebreak': 'off', // let Prettier handle line breaks | ||
'import/no-extraneous-dependencies': 'off', // We need zero deps for npm | ||
'object-curly-newline': 'off', // let Prettier handle line breaks | ||
'operator-linebreak': 'off', // let Prettier handle line breaks | ||
'react-hooks/exhaustive-deps': 'error', | ||
'react-hooks/rules-of-hooks': 'error', | ||
'react/jsx-filename-extension': ['error', { extensions: ['.jsx', '.tsx'] }], | ||
'react/jsx-one-expression-per-line': 'off', // let Prettier handle linke wrapping | ||
'react/prop-types': 'off', // not needed in TS | ||
'sort-keys': 'error', | ||
}, | ||
settings: { | ||
'import/parsers': { | ||
'@typescript-eslint/parser': ['.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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
coverage | ||
node_modules | ||
pkg |
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 @@ | ||
{ | ||
"printWidth": 100, | ||
"singleQuote": true, | ||
"trailingComma": "es5" | ||
} |
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,11 @@ | ||
import { configure } from '@storybook/react'; | ||
import '../assets/react-select-zero.css'; | ||
|
||
// Load stories (import all files ending in *.stories.js) | ||
const req = require.context('../stories', true, /\.stories\.tsx?$/); | ||
|
||
function loadStories() { | ||
req.keys().forEach(filename => req(filename)); | ||
} | ||
|
||
configure(loadStories, module); |
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 = ({ config }) => { | ||
config.module.rules.push({ | ||
test: /\.(ts|tsx)$/, | ||
use: [ | ||
{ | ||
loader: require.resolve('awesome-typescript-loader'), | ||
}, | ||
], | ||
}); | ||
config.resolve.extensions.push('.ts', '.tsx'); | ||
return config; | ||
}; |
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,9 @@ | ||
module.exports = { | ||
extends: ['stylelint-config-standard', 'stylelint-config-prettier'], | ||
plugins: ['stylelint-order'], | ||
rules: { | ||
'declaration-colon-newline-after': null, // let Prettier decide (when to put values on a new line new line) | ||
'property-no-vendor-prefix': null, // some properties need vendor prefixes | ||
'value-list-comma-newline-after': null, // let Prettier decide (when to put comma separated values on new lines) | ||
}, | ||
}; |
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,19 @@ | ||
language: node_js | ||
services: | ||
- docker | ||
node_js: | ||
- 12.4.0 | ||
cache: npm | ||
stages: | ||
- test | ||
- publish | ||
jobs: | ||
include: | ||
- stage: test | ||
name: "\U0001F5DC️ Run tests" | ||
script: npm run test:coverage | ||
after_success: | ||
- npx codecov | ||
branches: | ||
only: | ||
- master |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,5 @@ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
setupFilesAfterEnv: ['jest-dom/extend-expect', '@testing-library/react/cleanup-after-each'], | ||
testPathIgnorePatterns: ['/node_modules/', '/dist/'], | ||
}; |
Oops, something went wrong.