Skip to content

Commit

Permalink
Feature/repo maintenance (#71)
Browse files Browse the repository at this point in the history
* - removed form since we are not using it in this form
- cleared package json out of unused deps
- removed lodash dep in favor of native js
- tweaked eslint/prettier/ configs
- enabled husky and lint-staged back
- added dependabot config

* added eslint ignore line in doc layout

* batch major version updating

* removed stale stories

* added dependabot config; another deps update to wanted versions

* tweaked labels settings in dependabot

* - updated dependencies
- tweaked dependabot config so that it will make not more than 1 PR once a month - it is now a mere trigger for manual batch update, those PRs create too much of a fuss
- gatsby-remark-images now saved as exact version of 3.3.21 since all upcoming are broken when it comes to generate webp srcset path

* keeping deps up to date

* temporarily tweaked circleci settings to test changes in stagins

* fixed circleci's config typo

* revert back circleci config
  • Loading branch information
Kirill Bolotsky authored Aug 18, 2020
1 parent 584f94c commit bc038e3
Show file tree
Hide file tree
Showing 35 changed files with 4,711 additions and 9,141 deletions.
11 changes: 4 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: npm install
- save_cache:
paths:
Expand Down Expand Up @@ -57,7 +57,6 @@ jobs:
command: GATSBY_CPU_COUNT=1 npm run build:gatsby
no_output_timeout: 15m
- run: npm run deploy


deploy-to-production:
<<: *defaults
Expand Down Expand Up @@ -90,8 +89,6 @@ jobs:
no_output_timeout: 15m
- run: npm run deploy



workflows:
version: 2
build-deploy:
Expand All @@ -113,4 +110,4 @@ workflows:
- build
filters:
branches:
only: master
only: master
27 changes: 23 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,20 @@
"react/jsx-one-expression-per-line": 0,
"react/jsx-props-no-spreading": 0,
"react/jsx-wrap-multilines": 0,
"import/order": 0, // TODO: Come up with a solution for this
"import/no-extraneous-dependencies": [
"warn",
{ "devDependencies": false, "peerDependencies": true }
],
"import/order": [
"warn",
{
"alphabetize": {
"order": "asc" /* sort in ascending order. Options: ['ignore', 'asc', 'desc'] */,
"caseInsensitive": true /* ignore case. Options: [true, false] */
},
"newlines-between": "always"
}
],
"import/no-unresolved": [
2,
{
Expand All @@ -57,8 +70,14 @@
],
"import/prefer-default-export": 0,
"jsx-a11y/html-has-lang": 0, // We use react-helmet for that
"jsx-a11y/control-has-associated-label": 0
"jsx-a11y/control-has-associated-label": 0,
"mdx/no-jsx-html-comments": "error",
"mdx/no-unescaped-entities": "error",
"mdx/no-unused-expressions": "error"
},
"extends": ["airbnb", "prettier"],
"plugins": ["prettier"]
"extends": ["airbnb", "plugin:mdx/recommended", "prettier"],
"plugins": ["prettier"],
"parserOptions": {
"extensions": [".md", ".mdx"]
}
}
30 changes: 30 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Basic dependabot.yml file with
# minimum configuration for one package manager

version: 2
updates:
# Enable version updates for npm
- package-ecosystem: 'npm'
# Look for `package.json` and `lock` files in the `root` directory
directory: '/'
# Check the npm registry for updates every month
schedule:
interval: 'monthly'
# Set limit on amount of opened PRs with deps updates to 1:
# previous experience with depndabot clearly shows, that
# separate PRs create too much of a fuss so I intend
# to use it as a mere once-a-month notifier that it is
# time for batch manual deps update
open-pull-requests-limit: 1
# Set the target branch
target-branch: 'develop'
# Set labels
labels:
- 'maintenance'
- 'dependencies'
# Set reviewers
reviewers:
- 'bolotskyDev'
# Set assignees
assignees:
- 'bolotskyDev'
5 changes: 5 additions & 0 deletions .huskyrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"hooks": {
"pre-commit": "lint-staged"
}
}
3 changes: 3 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"*.js": ["eslint --cache --fix", "prettier --write"]
}
1 change: 1 addition & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ module.exports = {
'Docs k6.io - Performance testing for developers, like unit-testing, for performance', // <title>
shortSiteTitle: 'k6', // <title> ending for posts and pages
siteDescription:
// eslint-disable-next-line max-len
'Docs k6 is an open source developer-centric load and performance regression testing tool for cloud native APIs, microservices and web sites/apps. Tests are written in ES6 JS with support for HTTP/1.1, HTTP/2.0 and WebSocket protocols.',
siteImage: '/images/landscape-icon.png',
siteLanguage: 'en',
Expand Down
3 changes: 2 additions & 1 deletion gatsby-node.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const Path = require('path');

const {
pathCollisionDetector,
slugify,
Expand All @@ -15,7 +17,6 @@ const {
dedupePath,
removeGuidesAndRedirectWelcome,
} = require('./src/utils/utils');
const Path = require('path');

// auxilary flag to determine the environment (staging/prod)
const isProduction =
Expand Down
Loading

0 comments on commit bc038e3

Please sign in to comment.