Skip to content

Commit 5511f75

Browse files
authored
Merge pull request #90 from NHSDigital/v4/upgrade-tools
Uplift Dependencies & Tooling
2 parents 9d17972 + df42847 commit 5511f75

File tree

155 files changed

+4297
-5194
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+4297
-5194
lines changed

.babelrc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
{
2-
"ignore": ["**/__tests__/*", "*/__mocks__/*", "*/setupTests.ts"]
2+
"presets": ["@babel/preset-env", "@babel/typescript", "@babel/preset-react"],
3+
"plugins": [
4+
"@babel/plugin-proposal-numeric-separator",
5+
["@babel/proposal-class-properties", { "loose": true }],
6+
"@babel/proposal-object-rest-spread",
7+
["@babel/plugin-proposal-private-property-in-object", { "loose": true }],
8+
["@babel/plugin-proposal-private-methods", { "loose": true }]
9+
],
10+
"sourceMaps": "inline"
311
}

.eslintrc

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"parserOptions": {
4+
"ecmaVersion": 2021,
5+
"sourceType": "module",
6+
"ecmaFeatures": {
7+
"jsx": true
8+
}
9+
},
10+
"env": {
11+
"browser": true,
12+
"es6": true,
13+
"jest": true
14+
},
15+
"settings": {
16+
"react": {
17+
"version": "detect"
18+
}
19+
},
20+
"extends": [
21+
"plugin:react/recommended",
22+
"plugin:@typescript-eslint/recommended",
23+
"prettier",
24+
"plugin:import/errors",
25+
"plugin:import/warnings",
26+
"plugin:import/typescript",
27+
"plugin:jsx-a11y/recommended",
28+
"plugin:react-hooks/recommended"
29+
],
30+
"rules": {
31+
"react/prop-types": 0,
32+
"jsx-a11y/anchor-has-content": 0,
33+
"jsx-a11y/alt-text": 0,
34+
"jsx-a11y/heading-has-content": 0,
35+
"react-hooks/exhaustive-deps": 0
36+
}
37+
}

.eslintrc.js

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- name: Yarn Install
1212
run: yarn
1313
- name: Lint
14-
run: yarn lint
14+
run: yarn lint:ci
1515
- name: Jest Tests
1616
run: yarn test:ci
1717
- name: Typescript build

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "all",
4+
"singleQuote": true,
5+
"printWidth": 100,
6+
"tabWidth": 2
7+
}

.prettierrc.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

.storybook/main.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1+
const path = require("path");
2+
13
module.exports = {
2-
stories: ['../stories/*.stories.@(ts|tsx)', '../stories/**/*.stories.@(ts|tsx)'],
3-
addons: ['@storybook/addon-links', '@storybook/addon-essentials', '@storybook/preset-scss'],
4+
stories: ["../stories/**/*.stories.@(ts|tsx)"],
5+
addons: ["@storybook/addon-links", "@storybook/addon-essentials"],
6+
webpackFinal: (config) => {
7+
config.module.rules.push({
8+
test: /\.scss$/,
9+
use: ["style-loader", "css-loader", "sass-loader"],
10+
include: path.resolve(__dirname, "../"),
11+
});
412

5-
typescript: {
6-
check: true,
7-
checkOptions: {},
8-
reactDocgen: 'react-docgen-typescript',
13+
return config;
914
},
1015
};

.storybook/manager.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { addons } from "@storybook/addons";
2-
import nhsTheme from "./theme";
1+
import { addons } from '@storybook/addons';
2+
import nhsTheme from './theme';
33

44
addons.setConfig({
5-
theme: nhsTheme
5+
theme: nhsTheme,
66
});

.storybook/preview.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ import "./storybook.scss";
22

33
export const parameters = {
44
actions: { argTypesRegex: "^on[A-Z].*" },
5-
}
6-
5+
};

.storybook/theme.js

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,35 @@ import { create } from "@storybook/theming/create";
22
const version = require("../package.json").version;
33

44
export default create({
5-
base: 'light',
6-
background: 'white',
7-
colorPrimary: '#005eb8',
8-
colorSecondary: '#425563',
5+
base: "light",
6+
background: "white",
7+
colorPrimary: "#005eb8",
8+
colorSecondary: "#768692",
99

10-
// UI
11-
appBg: 'white',
12-
appContentBg: 'white',
13-
appBorderColor: 'grey',
14-
appBorderRadius: 4,
10+
// UI
11+
appBg: "white",
12+
appContentBg: "white",
13+
appBorderColor: "grey",
14+
appBorderRadius: 4,
1515

16-
// Typography
17-
fontCode: 'monospace',
16+
// Typography
17+
fontCode: "monospace",
1818

19-
// Text colors
20-
textColor: '#212b32',
21-
textInverseColor: 'white',
19+
// Text colors
20+
textColor: "#212b32",
21+
textInverseColor: "white",
2222

23-
// Toolbar default and active colors
24-
barTextColor: 'rgba(255,255,255,0.8)',
25-
barSelectedColor: 'rgba(255,255,255,1)',
26-
barBg: '#005eb8',
23+
// Toolbar default and active colors
24+
barTextColor: "rgba(255,255,255,0.8)",
25+
barSelectedColor: "rgba(255,255,255,1)",
26+
barBg: "#005eb8",
2727

28-
// Form colors
29-
inputBg: 'white',
30-
inputBorder: '#425563',
31-
inputTextColor: '#212b32',
32-
inputBorderRadius: 4,
28+
// Form colors
29+
inputBg: "white",
30+
inputBorder: "#425563",
31+
inputTextColor: "#212b32",
32+
inputBorderRadius: 4,
3333

34-
brandTitle: `NHS.UK React Components (v${version})`,
35-
brandUrl: 'https://github.com/NHSDigital/nhsuk-react-components'
34+
brandTitle: `NHS.UK React Components (v${version})`,
35+
brandUrl: "https://github.com/NHSDigital/nhsuk-react-components",
3636
});

0 commit comments

Comments
 (0)