This repository has been archived by the owner on Oct 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mocking up how using it in tests might work (#2)
mocking up how using it in tests might work
- Loading branch information
Showing
16 changed files
with
4,969 additions
and
938 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
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,24 @@ | ||
# Editor config configuration: https://editorconfig.org/ | ||
# Generated by rel-engage | ||
|
||
root = true | ||
|
||
[**{.js,.ts,.html,.hbs,.mustache,.xml,.xsl,.scss,.css,.sh,.vcl,.mk,Makefile,.json,.yml,.yaml,.md}] | ||
[**{.js,.jsx,.ts,.tsx,.html,.hbs,.mustache,.xml,.xsl,.scss,.css,.sh,.vcl,.mk,Makefile}] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
indent_style = tab | ||
|
||
[**{.json,.yml,.yaml}] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
indent_size = 2 | ||
indent_style = space | ||
|
||
[*.md] | ||
indent_size = unset | ||
indent_style = unset | ||
trim_trailing_whitespace = false |
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,14 @@ | ||
# Ignore file for eslint: https://eslint.org/docs/user-guide/configuring#eslintignore | ||
# Generated by rel-engage | ||
|
||
*.json | ||
|
||
.serverless | ||
.cache-loader | ||
.webpack | ||
|
||
build | ||
dist | ||
coverage | ||
|
||
secret-squirrel.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 |
---|---|---|
@@ -1,36 +1,15 @@ | ||
/* | ||
ESLint config file: https://eslint.org/docs/user-guide/configuring | ||
Configures Javascript linting | ||
Generated by rel-engage | ||
*/ | ||
|
||
'use strict'; | ||
|
||
module.exports = { | ||
extends: [ | ||
'origami-component', | ||
'plugin:prettier/recommended', | ||
// Cannot use `@financial-times/rel-engage/packages/dotfiles/eslint` | ||
// as this is translated to `eslint-config-@financial-times/rel-engage/packages/dotfiles/eslint | ||
'./node_modules/@financial-times/rel-engage/packages/dotfiles/eslint.js', | ||
], | ||
env: { | ||
node: true, | ||
jest: true, | ||
}, | ||
parserOptions: { | ||
ecmaVersion: 2017, | ||
ecmaFeatures: { | ||
jsx: true | ||
}, | ||
}, | ||
globals: { | ||
expect: true, | ||
sinon: true, | ||
tinymce: true | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['**/*.jsx'], | ||
settings: { | ||
react: { | ||
pragma: 'h' | ||
} | ||
}, | ||
} | ||
], | ||
rules: { | ||
'react/prop-types': 0, | ||
'react/jsx-key': 0, | ||
'new-cap': 0 | ||
} | ||
}; |
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,10 @@ | ||
/* eslint-disable import/no-unresolved, import/no-extraneous-dependencies */ | ||
/* | ||
Husky config file: https://github.com/typicode/husky | ||
Configures git hooks | ||
Generated by rel-engage | ||
*/ | ||
|
||
'use strict'; | ||
|
||
module.exports = require('@financial-times/rel-engage/packages/dotfiles/husky'); |
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,10 @@ | ||
/* eslint-disable import/no-unresolved, import/no-extraneous-dependencies */ | ||
/* | ||
Lint-staged config file: https://github.com/okonet/lint-staged | ||
Configures per-file-extension tasks ran on pre-commit | ||
Generated by rel-engage | ||
*/ | ||
|
||
'use strict'; | ||
|
||
module.exports = require('@financial-times/rel-engage/packages/dotfiles/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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Ignore file for prettier: https://prettier.io/docs/en/ignore.html | ||
# Generated by rel-engage | ||
|
||
.webpack | ||
.cache-loader | ||
.DS_Store | ||
.serverless | ||
*.mk | ||
build | ||
coverage | ||
dist | ||
Makefile | ||
node_modules | ||
bower_components | ||
package-lock.json | ||
package.json | ||
bower.json | ||
tslint.json | ||
.vscode | ||
.idea |
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,10 @@ | ||
/* eslint-disable import/no-unresolved, import/no-extraneous-dependencies */ | ||
/* | ||
Prettier config file: https://prettier.io/docs/en/configuration.html | ||
Configures file formatting behaviour | ||
Generated by rel-engage | ||
*/ | ||
|
||
'use strict'; | ||
|
||
module.exports = require('@financial-times/rel-engage/packages/dotfiles/prettier'); |
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 @@ | ||
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities. | ||
version: v1.13.5 | ||
ignore: {} | ||
patch: {} |
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,15 +1,22 @@ | ||
export PATH := ./node_modules/.bin:$(PATH) | ||
# --------------------------- | ||
# Generated by rel-engage | ||
|
||
lint: | ||
ifneq ($(CIRCLECI),) | ||
eslint . | ||
else | ||
eslint --cache --fix . | ||
prettier --write *.md | ||
endif | ||
# This task tells make how to 'build' n-gage. It npm installs n-gage, and | ||
# Once that's done it overwrites the file with its own contents - this | ||
# ensures the timestamp on the file is recent, so make won't think the file | ||
# is out of date and try to rebuild it every time | ||
node_modules/@financial-times/rel-engage/index.mk: | ||
@echo "Updating rel-engage" | ||
@npm install --save-dev @financial-times/rel-engage | ||
@touch $@ | ||
|
||
test: lint | ||
# If, by the end of parsing your `Makefile`, `make` finds that any files | ||
# referenced with `-include` don't exist or are out of date, it will run any | ||
# tasks it finds that match the missing file. So if n-gage *is* installed | ||
# it will just be included; if not, it will look for a task to run | ||
-include node_modules/@financial-times/rel-engage/index.mk | ||
|
||
publish: | ||
npm version --no-git-tag-version ${CIRCLE_TAG} | ||
npm publish --access public | ||
# End generated by rel-engage | ||
# --------------------------- | ||
|
||
test: verify |
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
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
Oops, something went wrong.