Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
121 changed files
with
20,057 additions
and
24,747 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,102 @@ | ||
aliases: | ||
- &install_yarn_version | ||
name: Install specific Yarn version | ||
command: | | ||
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.21.1 | ||
echo 'export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"' >> $BASH_ENV | ||
- &restore_yarn_cache | ||
name: Restore Yarn cache | ||
keys: | ||
- yarn-{{ .Branch }}-packages-{{ checksum "yarn.lock" }} | ||
|
||
- &save_yarn_cache | ||
name: Save Yarn cache | ||
key: yarn-{{ .Branch }}-packages-{{ checksum "yarn.lock" }} | ||
paths: | ||
- ~/.cache/yarn | ||
|
||
- &run_yarn_install | ||
name: Install dependencies | ||
command: yarn install | ||
|
||
defaults: &defaults | ||
working_directory: ~/autocompletejs | ||
docker: | ||
- image: circleci/node:12.14.1 | ||
|
||
version: 2 | ||
jobs: | ||
test_build: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
- run: *install_yarn_version | ||
- restore_cache: *restore_yarn_cache | ||
- run: *run_yarn_install | ||
- save_cache: *save_yarn_cache | ||
- run: | ||
name: Build & Test packages size | ||
command: | | ||
yarn run build | ||
yarn run test:size | ||
test_lint: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
- run: *install_yarn_version | ||
- restore_cache: *restore_yarn_cache | ||
- run: *run_yarn_install | ||
- save_cache: *save_yarn_cache | ||
- run: | ||
name: Lint & Code styles | ||
command: yarn run lint | ||
- run: | ||
name: Type Checking | ||
command: yarn run type-check | ||
|
||
test_unit: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
- run: *install_yarn_version | ||
- restore_cache: *restore_yarn_cache | ||
- run: *run_yarn_install | ||
- save_cache: *save_yarn_cache | ||
- run: | ||
name: Unit tests | ||
command: yarn run test --maxWorkers=4 | ||
|
||
release: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
- run: *install_yarn_version | ||
- restore_cache: *restore_yarn_cache | ||
- run: *run_yarn_install | ||
- save_cache: *save_yarn_cache | ||
- run: | ||
name: Release | ||
command: yarn run release:trigger | ||
|
||
workflows: | ||
version: 2 | ||
ci: | ||
jobs: | ||
- test_build: | ||
filters: | ||
branches: | ||
only: next | ||
- test_unit: | ||
filters: | ||
branches: | ||
only: next | ||
- test_lint: | ||
filters: | ||
branches: | ||
only: next | ||
- release: | ||
filters: | ||
branches: | ||
only: next |
This file was deleted.
Oops, something went wrong.
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,8 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = 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 @@ | ||
GITHUB_TOKEN= |
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 @@ | ||
/node_modules | ||
dist | ||
/examples |
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,31 @@ | ||
module.exports = { | ||
extends: ['algolia', 'algolia/jest', 'algolia/react', 'algolia/typescript'], | ||
globals: { | ||
__DEV__: false, | ||
}, | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
pragma: 'h', | ||
}, | ||
'import/resolver': { | ||
node: { | ||
extensions: ['.js', '.ts', '.tsx'], | ||
}, | ||
}, | ||
}, | ||
rules: { | ||
'no-param-reassign': 0, | ||
'valid-jsdoc': 0, | ||
'no-shadow': 0, | ||
'prefer-template': 0, | ||
'jest/no-disabled-tests': 0, | ||
'react/prop-types': 0, | ||
'react/no-unescaped-entities': 0, | ||
'eslint-comments/disable-enable-pair': ['error', { allowWholeFile: true }], | ||
'import/extensions': 0, | ||
'@typescript-eslint/camelcase': ['error', { allow: ['__autocomplete_id'] }], | ||
// Useful to call functions like `nodeItem?.scrollIntoView()`. | ||
'no-unused-expressions': 0, | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
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,16 +1,19 @@ | ||
*.swp | ||
# Generated files | ||
node_modules/ | ||
.DS_Store | ||
|
||
.grunt | ||
_SpecRunner.html | ||
.eslintcache | ||
*.log | ||
coverage/ | ||
.cache | ||
|
||
# Bundle build files | ||
dist/ | ||
|
||
node_modules | ||
npm-debug.log | ||
# Deployment build files | ||
/website/stories | ||
|
||
bower_components | ||
# IDE | ||
.vscode/ | ||
|
||
*.iml | ||
.idea | ||
.vscode | ||
netlify-dist/ | ||
# Environment files | ||
.env |
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.14.1 |
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 @@ | ||
{ | ||
"proseWrap": "never", | ||
"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,20 @@ | ||
import { addParameters, configure } from '@storybook/html'; | ||
import { create } from '@storybook/theming'; | ||
|
||
addParameters({ | ||
options: { | ||
theme: create({ | ||
base: 'light', | ||
brandTitle: 'Autocomplete.js', | ||
brandUrl: 'https://github.com/algolia/autocomplete.js', | ||
}), | ||
}, | ||
}); | ||
|
||
const req = require.context('../stories', true, /.stories.(js|ts|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,25 @@ | ||
type StoryFn = ({ | ||
container, | ||
dropdownContainer, | ||
}: { | ||
container: HTMLElement; | ||
dropdownContainer: HTMLElement; | ||
}) => void; | ||
|
||
export function withPlayground(storyFn: StoryFn) { | ||
return () => { | ||
const root = document.createElement('div'); | ||
const container = document.createElement('div'); | ||
const dropdownContainer = document.createElement('div'); | ||
|
||
root.appendChild(container); | ||
root.appendChild(dropdownContainer); | ||
|
||
storyFn({ | ||
container, | ||
dropdownContainer, | ||
}); | ||
|
||
return root; | ||
}; | ||
} |
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,2 @@ | ||
<link rel="stylesheet" href="storybook.css" /> | ||
<link rel="stylesheet" href="autocomplete.css" /> |
Oops, something went wrong.