Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/tasks/common/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ module.exports = function build(config) {
// Use `.babelrc.template` as name to not trigger babel
// when requiring the file `.template.js` in end-to-end tests
// and rename it `.babelrc` afterwards
[/\.babelrc.template$/, '.babelrc'],
['.babelrc.template', '.babelrc'],
['.eslintrc.js.hbs', '.eslintrc.js'],
])
)
.use(inPlace())
Expand Down
125 changes: 120 additions & 5 deletions scripts/__snapshots__/e2e-templates.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,30 @@ Array [
]
`;

exports[`Templates InstantSearch.js File content: .editorconfig 1`] = `
"root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true"
`;

exports[`Templates InstantSearch.js File content: .eslintignore 1`] = `
"/node_modules
/dist
/.cache"
`;

exports[`Templates InstantSearch.js File content: .eslintrc.js 1`] = `
"module.exports = {
extends: 'algolia',
};"
`;

exports[`Templates InstantSearch.js File content: .gitignore 1`] = `
"# See https://help.github.com/ignore-files/ for more about ignoring files.

Expand All @@ -970,6 +994,14 @@ yarn-debug.log*
yarn-error.log*"
`;

exports[`Templates InstantSearch.js File content: .prettierrc 1`] = `
"{
\\"singleQuote\\": true,
\\"proseWrap\\": \\"never\\",
\\"trailingComma\\": \\"es5\\"
}"
`;

exports[`Templates InstantSearch.js File content: README.md 1`] = `
"# instantsearch.js-app

Expand Down Expand Up @@ -1073,10 +1105,19 @@ exports[`Templates InstantSearch.js File content: package.json 1`] = `
\\"private\\": true,
\\"scripts\\": {
\\"start\\": \\"parcel index.html --port 3000\\",
\\"build\\": \\"parcel build index.html\\"
\\"build\\": \\"parcel build index.html\\",
\\"lint\\": \\"eslint .\\",
\\"lint:fix\\": \\"npm run lint -- --fix\\"
},
\\"devDependencies\\": {
\\"parcel-bundler\\": \\"^1.8.1\\"
\\"babel-eslint\\": \\"^8.2.3\\",
\\"eslint\\": \\"^4.19.1\\",
\\"eslint-config-algolia\\": \\"^13.1.0\\",
\\"eslint-config-prettier\\": \\"^2.9.0\\",
\\"eslint-plugin-import\\": \\"^2.12.0\\",
\\"eslint-plugin-prettier\\": \\"^2.6.0\\",
\\"parcel-bundler\\": \\"^1.8.1\\",
\\"prettier\\": \\"^1.13.4\\"
}
}"
`;
Expand Down Expand Up @@ -1202,7 +1243,6 @@ search.addWidget(
})
);


search.addWidget(
instantsearch.widgets.pagination({
container: '#pagination',
Expand All @@ -1227,7 +1267,11 @@ body {

exports[`Templates InstantSearch.js Folder structure: contains the right files 1`] = `
Array [
".editorconfig",
".eslintignore",
".eslintrc.js",
".gitignore",
".prettierrc",
"README.md",
"favicon.png",
"index.html",
Expand All @@ -1239,6 +1283,24 @@ Array [
]
`;

exports[`Templates React InstantSearch File content: .editorconfig 1`] = `
"root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true"
`;

exports[`Templates React InstantSearch File content: .eslintrc.js 1`] = `
"module.exports = {
extends: 'algolia/react',
};"
`;

exports[`Templates React InstantSearch File content: .gitignore 1`] = `
"# See https://help.github.com/ignore-files/ for more about ignoring files.

Expand All @@ -1263,6 +1325,14 @@ yarn-debug.log*
yarn-error.log*"
`;

exports[`Templates React InstantSearch File content: .prettierrc 1`] = `
"{
\\"singleQuote\\": true,
\\"proseWrap\\": \\"never\\",
\\"trailingComma\\": \\"es5\\"
}"
`;

exports[`Templates React InstantSearch File content: README.md 1`] = `
"# react-instantsearch-app

Expand Down Expand Up @@ -1292,7 +1362,9 @@ exports[`Templates React InstantSearch File content: package.json 1`] = `
\\"private\\": true,
\\"scripts\\": {
\\"start\\": \\"react-scripts start\\",
\\"build\\": \\"react-scripts build\\"
\\"build\\": \\"react-scripts build\\",
\\"lint\\": \\"eslint .\\",
\\"lint:fix\\": \\"npm run lint -- --fix\\"
},
\\"dependencies\\": {
\\"react\\": \\"^16.3.2\\",
Expand All @@ -1301,6 +1373,13 @@ exports[`Templates React InstantSearch File content: package.json 1`] = `
\\"react-scripts\\": \\"1.1.4\\"
},
\\"devDependencies\\": {
\\"eslint\\": \\"^4.19.1\\",
\\"eslint-config-algolia\\": \\"^13.1.0\\",
\\"eslint-config-prettier\\": \\"^2.9.0\\",
\\"eslint-plugin-import\\": \\"^2.12.0\\",
\\"eslint-plugin-prettier\\": \\"^2.6.0\\",
\\"eslint-plugin-react\\": \\"^7.9.1\\",
\\"prettier\\": \\"^1.13.4\\",
\\"prop-types\\": \\"^15.6.1\\"
}
}"
Expand Down Expand Up @@ -1515,7 +1594,10 @@ ReactDOM.render(<App />, document.getElementById('root'));"

exports[`Templates React InstantSearch Folder structure: contains the right files 1`] = `
Array [
".editorconfig",
".eslintrc.js",
".gitignore",
".prettierrc",
"README.md",
"package.json",
"public/favicon.png",
Expand All @@ -1537,6 +1619,27 @@ exports[`Templates Vue InstantSearch File content: .babelrc 1`] = `
}"
`;

exports[`Templates Vue InstantSearch File content: .editorconfig 1`] = `
"root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true"
`;

exports[`Templates Vue InstantSearch File content: .eslintrc.js 1`] = `
"module.exports = {
extends: 'algolia/vue',
rules: {
'import/no-commonjs': 'off',
},
};"
`;

exports[`Templates Vue InstantSearch File content: .gitignore 1`] = `
"node_modules/
npm-debug.log
Expand Down Expand Up @@ -1626,20 +1729,30 @@ exports[`Templates Vue InstantSearch File content: package.json 1`] = `
\\"private\\": true,
\\"scripts\\": {
\\"start\\": \\"cross-env NODE_ENV=development webpack-dev-server --port 3000 --hot\\",
\\"build\\": \\"cross-env NODE_ENV=production webpack --progress --hide-modules\\"
\\"build\\": \\"cross-env NODE_ENV=production webpack --progress --hide-modules\\",
\\"lint\\": \\"eslint --ext .js,.vue .\\",
\\"lint:fix\\": \\"npm run lint -- --fix\\"
},
\\"dependencies\\": {
\\"vue\\": \\"^2.5.16\\",
\\"vue-instantsearch\\": \\"^1.0.0\\"
},
\\"devDependencies\\": {
\\"babel-core\\": \\"6.26.0\\",
\\"babel-eslint\\": \\"^8.2.3\\",
\\"babel-loader\\": \\"7.1.4\\",
\\"babel-preset-env\\": \\"1.6.1\\",
\\"babel-preset-stage-3\\": \\"6.24.1\\",
\\"cross-env\\": \\"5.1.4\\",
\\"css-loader\\": \\"0.28.11\\",
\\"eslint\\": \\"^4.19.1\\",
\\"eslint-config-algolia\\": \\"^13.1.0\\",
\\"eslint-config-prettier\\": \\"^2.9.0\\",
\\"eslint-plugin-html\\": \\"^4.0.3\\",
\\"eslint-plugin-import\\": \\"^2.12.0\\",
\\"eslint-plugin-prettier\\": \\"^2.6.0\\",
\\"file-loader\\": \\"1.1.11\\",
\\"prettier\\": \\"^1.13.4\\",
\\"vue-loader\\": \\"14.2.2\\",
\\"vue-template-compiler\\": \\"2.5.16\\",
\\"webpack\\": \\"3.11.0\\",
Expand Down Expand Up @@ -1888,6 +2001,8 @@ if (process.env.NODE_ENV === 'production') {
exports[`Templates Vue InstantSearch Folder structure: contains the right files 1`] = `
Array [
".babelrc",
".editorconfig",
".eslintrc.js",
".gitignore",
"README.md",
"favicon.png",
Expand Down
9 changes: 9 additions & 0 deletions templates/InstantSearch.js/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
3 changes: 3 additions & 0 deletions templates/InstantSearch.js/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/node_modules
/dist
/.cache
3 changes: 3 additions & 0 deletions templates/InstantSearch.js/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: 'algolia',
};
5 changes: 5 additions & 0 deletions templates/InstantSearch.js/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"singleQuote": true,
"proseWrap": "never",
"trailingComma": "es5"
}
13 changes: 11 additions & 2 deletions templates/InstantSearch.js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,18 @@
"private": true,
"scripts": {
"start": "parcel index.html --port 3000",
"build": "parcel build index.html"
"build": "parcel build index.html",
"lint": "eslint .",
"lint:fix": "npm run lint -- --fix"
},
"devDependencies": {
"parcel-bundler": "^1.8.1"
"babel-eslint": "^8.2.3",
"eslint": "^4.19.1",
"eslint-config-algolia": "^13.1.0",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-prettier": "^2.6.0",
"parcel-bundler": "^1.8.1",
"prettier": "^1.13.4"
}
}
1 change: 0 additions & 1 deletion templates/InstantSearch.js/src/app.js.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ search.addWidget(
);

{{/each}}

search.addWidget(
instantsearch.widgets.pagination({
container: '#pagination',
Expand Down
9 changes: 9 additions & 0 deletions templates/React InstantSearch/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
3 changes: 3 additions & 0 deletions templates/React InstantSearch/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: 'algolia/react',
};
5 changes: 5 additions & 0 deletions templates/React InstantSearch/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"singleQuote": true,
"proseWrap": "never",
"trailingComma": "es5"
}
11 changes: 10 additions & 1 deletion templates/React InstantSearch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"private": true,
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build"
"build": "react-scripts build",
"lint": "eslint .",
"lint:fix": "npm run lint -- --fix"
},
"dependencies": {
"react": "^16.3.2",
Expand All @@ -13,6 +15,13 @@
"react-scripts": "1.1.4"
},
"devDependencies": {
"eslint": "^4.19.1",
"eslint-config-algolia": "^13.1.0",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-prettier": "^2.6.0",
"eslint-plugin-react": "^7.9.1",
"prettier": "^1.13.4",
"prop-types": "^15.6.1"
}
}
9 changes: 9 additions & 0 deletions templates/Vue InstantSearch/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
6 changes: 6 additions & 0 deletions templates/Vue InstantSearch/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
extends: 'algolia/vue',
rules: {
'import/no-commonjs': 'off',
},
};
12 changes: 11 additions & 1 deletion templates/Vue InstantSearch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,30 @@
"private": true,
"scripts": {
"start": "cross-env NODE_ENV=development webpack-dev-server --port 3000 --hot",
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
"lint": "eslint --ext .js,.vue .",
"lint:fix": "npm run lint -- --fix"
},
"dependencies": {
"vue": "^2.5.16",
"vue-instantsearch": "^{{libraryVersion}}"
},
"devDependencies": {
"babel-core": "6.26.0",
"babel-eslint": "^8.2.3",
"babel-loader": "7.1.4",
"babel-preset-env": "1.6.1",
"babel-preset-stage-3": "6.24.1",
"cross-env": "5.1.4",
"css-loader": "0.28.11",
"eslint": "^4.19.1",
"eslint-config-algolia": "^13.1.0",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-html": "^4.0.3",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-prettier": "^2.6.0",
"file-loader": "1.1.11",
"prettier": "^1.13.4",
"vue-loader": "14.2.2",
"vue-template-compiler": "2.5.16",
"webpack": "3.11.0",
Expand Down