* Works, but lots of cleanup/questions. * Fixed comment. * Only want the search script to load once with InstantClick active. * Removed unnecessary DOMContentLoaded from copy paste. * 🔧 Enabled (P)React Devtools. * Updated comment about reactToEvent. * Removed unnecessary server-side generated JS for search. * <Search /> component now has component state. * Search functions are in there own module now. * 👷Refactor * Render propped it up. * Fixed issue with encoding of search term. * Removed data-no-instant attr from script. * 👷Refactor * Now flash of search loading is avoided.. * Moved search under components folder. * ✅Tests * fixedEncodeURIComponent does not need to be exported. * ✅Tests * Folders to ignore from the VS Code Local History extension. * ✅Tests * Snapshot test for <Search /> component. * ✅Tests * Now the <SearchContainer /> handles the '/' key shortcut. * Made the search box ID a prop defaulting to 'nav-search' * Excluded barrel files from code coverage. * Componentized search CSS. * Storybook stories for <Search /> component. * Removed extension folders to ignore. * Fixed logic for "/" key triggering search. * updated jest snapshot for <Search /> component. * updated package.json lock file. * Disabled the import/prefer-default-export rule. * Now search term clears if not on a non-search results page. * removed comment that is no longer valid. * No longer using render prop for Search. Doesn't make sense as it's not stuff that is reused. * Added preact-render-spy do dev deps.
39 lines
756 B
JavaScript
39 lines
756 B
JavaScript
module.exports = {
|
|
parser: 'babel-eslint',
|
|
extends: ['airbnb', 'prettier'],
|
|
parserOptions: {
|
|
ecmaVersion: 2017,
|
|
},
|
|
settings: {
|
|
react: {
|
|
pragma: 'h',
|
|
},
|
|
},
|
|
env: {
|
|
jest: true,
|
|
browser: true,
|
|
},
|
|
plugins: ['import', 'babel'],
|
|
rules: {
|
|
'import/no-extraneous-dependencies': [
|
|
'error',
|
|
{
|
|
devDependencies: ['**/*.test.js', '**/*.test.jsx', '**/*.stories.jsx'],
|
|
},
|
|
],
|
|
},
|
|
plugins: ['import'],
|
|
rules: {
|
|
'import/no-extraneous-dependencies': [
|
|
'error',
|
|
{
|
|
devDependencies: ['**/*.test.js', '**/*.test.jsx', '**/*.stories.jsx'],
|
|
},
|
|
],
|
|
'import/prefer-default-export': 'off',
|
|
},
|
|
globals: {
|
|
InstantClick: false,
|
|
filterXSS: false,
|
|
},
|
|
};
|