Skip to content

Commit 7c1254b

Browse files
Update dependency @cloudfour/eslint-plugin to v20 (#1860)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Caleb Eby <[email protected]>
1 parent b3752bc commit 7c1254b

File tree

96 files changed

+266
-169
lines changed

Some content is hidden

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

96 files changed

+266
-169
lines changed

.eslintrc.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@ module.exports = {
3636
rules: {
3737
// Src files are bundled so they do not have to follow Node's resolution rules
3838
'@cloudfour/n/no-missing-import': 'off',
39+
// Webpack (at least the version we're using) doesn't recognize node: imports
40+
'@cloudfour/unicorn/prefer-node-protocol': 'off',
41+
},
42+
},
43+
{
44+
files: ['*.mdx'],
45+
rules: {
46+
// The auto-fixer for this rule does not work with .mdx files.
47+
'@cloudfour/import/order': 'off',
3948
},
4049
},
4150
],

glob-sass-importer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
const glob = require('tiny-glob');
21
const path = require('path');
32

3+
const glob = require('tiny-glob');
4+
45
/** @typedef {{file: string} | {contents: string} | null } ResolveResult */
56

67
/**

gulpfile.js/tasks/build-sass.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1+
const cssnano = require('cssnano');
12
const { src, dest } = require('gulp');
2-
const outDir = 'dist';
3-
4-
const sass = require('gulp-sass')(require('sass'));
5-
const rename = require('gulp-rename');
63
const postcss = require('gulp-postcss');
7-
const cssnano = require('cssnano');
4+
const rename = require('gulp-rename');
5+
const sass = require('gulp-sass')(require('sass'));
86
sass.compiler = require('sass');
97

8+
const outDir = 'dist';
9+
1010
const buildSass = () =>
1111
src('./src/index.scss')
1212
.pipe(

gulpfile.js/tasks/build-scripts.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
const rollup = require('rollup');
1+
const fs = require('fs').promises;
22
const path = require('path');
3+
4+
const { getBabelInputPlugin } = require('@rollup/plugin-babel');
35
const nodeResolve = require('@rollup/plugin-node-resolve').default;
6+
const rollup = require('rollup');
7+
const dts = require('rollup-plugin-dts').default;
48
const { terser } = require('rollup-plugin-terser');
5-
const { getBabelInputPlugin } = require('@rollup/plugin-babel');
6-
const fs = require('fs').promises;
79
const glob = require('tiny-glob');
8-
const dts = require('rollup-plugin-dts').default;
910

1011
const outDir = 'dist';
1112
/** Used to hold TS output from tsc, before it gets bundled by rollup into `dist` */

gulpfile.js/tasks/svg-to-twig.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
const { readFileSync } = require('fs');
2+
const path = require('path');
3+
14
const { src, dest } = require('gulp');
2-
const svgmin = require('gulp-svgmin');
35
const rename = require('gulp-rename');
4-
const { obj } = require('through2');
5-
const ltx = require('ltx');
6+
const svgmin = require('gulp-svgmin');
67
const yaml = require('js-yaml');
7-
const path = require('path');
8-
const { readFileSync } = require('fs');
8+
const ltx = require('ltx');
9+
const { obj } = require('through2');
910

1011
// Load SVGO preferences from config file to keep things DRY
1112
const svgoPath = path.join(__dirname, '../../.svgo.yml');

gulpfile.js/tasks/watch-preprocess.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const { watch } = require('gulp');
2-
const svgToTwig = require('./svg-to-twig');
2+
33
const buildTokens = require('./build-tokens');
4+
const svgToTwig = require('./svg-to-twig');
45

56
module.exports = function () {
67
watch('src/assets/**/*.svg', svgToTwig);

package-lock.json

Lines changed: 100 additions & 41 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"@babel/preset-env": "7.18.2",
4949
"@changesets/changelog-github": "0.4.4",
5050
"@changesets/cli": "2.22.0",
51-
"@cloudfour/eslint-plugin": "19.0.0",
51+
"@cloudfour/eslint-plugin": "20.0.2",
5252
"@rollup/plugin-babel": "5.3.1",
5353
"@rollup/plugin-node-resolve": "13.3.0",
5454
"@storybook/addon-a11y": "6.5.9",
@@ -150,6 +150,12 @@
150150
"jest": {
151151
"setupFilesAfterEnv": [
152152
"./jest.setup.js"
153-
]
153+
],
154+
"moduleNameMapper": {
155+
"^(.+)\\.js$": [
156+
"$1.js",
157+
"$1.ts"
158+
]
159+
}
154160
}
155161
}

src/components/alert/alert.stories.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Story, Canvas, Meta } from '@storybook/addon-docs';
1+
import { Canvas, Meta, Story } from '@storybook/addon-docs';
22
import template from './alert.twig';
33

44
<Meta

src/components/author/author.stories.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Story, Canvas, Meta } from '@storybook/addon-docs';
1+
import { Canvas, Meta, Story } from '@storybook/addon-docs';
22
import template from './author.twig';
33
import ariannaImage from './demo/arianna.png';
44
import danielleImage from './demo/danielle.png';

src/components/author/author.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import path from 'path';
2+
23
import type { ElementHandle } from 'pleasantest';
34
import { getAccessibilityTree, withBrowser } from 'pleasantest';
4-
import { loadTwigTemplate } from '../../../test-utils';
5+
6+
import { loadTwigTemplate } from '../../../test-utils.js';
57

68
/** Helper to load the Twig template file */
79
const template = loadTwigTemplate(path.join(__dirname, './author.twig'));

src/components/avatar/avatar.stories.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Story, Canvas, Meta } from '@storybook/addon-docs';
1+
import { Canvas, Meta, Story } from '@storybook/addon-docs';
22
import template from './avatar.twig';
33
import demoImageSmall from './demo/tyler-64.png';
44
import demoImageMedium from './demo/tyler-335.png';

src/components/badge/badge.stories.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Story, Canvas, Meta } from '@storybook/addon-docs';
1+
import { Canvas, Meta, Story } from '@storybook/addon-docs';
22
import template from './badge.twig';
33
const badgeStory = (args) => {
44
// Don't bother with the inline options if they don't exist or are defaults

0 commit comments

Comments
 (0)