Skip to content

Commit dc361f3

Browse files
Upgrade: Bump @zazen/eslint-config from 2.1.0 to 2.3.0 (#73)
* Upgrade: Bump @zazen/eslint-config from 2.1.0 to 2.3.0 Bumps [@zazen/eslint-config](https://github.com/stormwarning/zazen-eslint-config) from 2.1.0 to 2.3.0. - [Release notes](https://github.com/stormwarning/zazen-eslint-config/releases) - [Changelog](https://github.com/stormwarning/zazen-eslint-config/blob/main/CHANGELOG.md) - [Commits](stormwarning/zazen-eslint-config@v2.1.0...v2.3.0) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Jeff <[email protected]>
1 parent 110e54d commit dc361f3

File tree

7 files changed

+579
-106
lines changed

7 files changed

+579
-106
lines changed

.eslintrc.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
module.exports = {
2-
extends: ['@zazen/eslint-config'],
3-
plugins: ['@typescript-eslint'],
4-
rules: {},
2+
extends: ['@zazen/eslint-config/typescript'],
3+
env: {
4+
node: true,
5+
},
6+
rules: {
7+
'@typescript-eslint/indent': 'off',
8+
'@typescript-eslint/space-before-function-paren': 'off',
9+
10+
'@typescript-eslint/explicit-function-return-type': 'off',
11+
},
512
overrides: [
613
{
7-
files: ['**/*.ts'],
8-
extends: [
9-
'@zazen/eslint-config',
10-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/src/configs/recommended.json
11-
'plugin:@typescript-eslint/recommended',
12-
// https://github.com/prettier/eslint-config-prettier/blob/master/%40typescript-eslint.js
13-
'prettier/@typescript-eslint',
14+
// Jest config
15+
files: [
16+
'**/__tests__/**/*.{js,ts,tsx}',
17+
'**/*.@(spec|test).{js,ts,tsx}',
1418
],
15-
parser: '@typescript-eslint/parser',
1619
env: {
17-
node: true,
18-
},
19-
rules: {
20-
'prefer-const': 'off',
20+
jest: true,
2121
},
2222
},
2323
],

__tests__/plugin.test.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const THEME_CONFIG = {
2121
}
2222

2323
expect.extend({
24-
toMatchCss: (receivedCss, expectedCss) => {
24+
toMatchCss: (receivedCss: string, expectedCss: string) => {
2525
let strip = (str: string) => str.replace(/[;\s]/g, '')
2626

2727
if (strip(receivedCss) === strip(expectedCss)) {
@@ -48,7 +48,7 @@ expect.extend({
4848

4949
describe('Plugin', () => {
5050
it('generates utility classes with a default root size', async () => {
51-
return postcss(
51+
return await postcss(
5252
tailwindcss({
5353
theme: {
5454
...THEME_CONFIG,
@@ -69,8 +69,6 @@ describe('Plugin', () => {
6969
from: undefined,
7070
})
7171
.then((result) => {
72-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
73-
// @ts-ignore
7472
expect(result.css).toMatchCss(`
7573
.font-sans.text-sm.leading-sm.capsize::before,
7674
.font-sans .text-sm.leading-sm.capsize::before,
@@ -156,7 +154,7 @@ describe('Plugin', () => {
156154
})
157155

158156
it('generates utility classes with a custom root size', async () => {
159-
return postcss(
157+
return await postcss(
160158
tailwindcss({
161159
theme: {
162160
...THEME_CONFIG,
@@ -177,8 +175,6 @@ describe('Plugin', () => {
177175
from: undefined,
178176
})
179177
.then((result) => {
180-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
181-
// @ts-ignore
182178
expect(result.css).toMatchCss(`
183179
.font-sans.text-sm.leading-sm.capsize::before,
184180
.font-sans .text-sm.leading-sm.capsize::before,
@@ -264,7 +260,7 @@ describe('Plugin', () => {
264260
})
265261

266262
it('works with unitless or percentage line-height values', async () => {
267-
return postcss(
263+
return await postcss(
268264
tailwindcss({
269265
theme: {
270266
...THEME_CONFIG,
@@ -284,8 +280,6 @@ describe('Plugin', () => {
284280
from: undefined,
285281
})
286282
.then((result) => {
287-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
288-
// @ts-ignore
289283
expect(result.css).toMatchCss(`
290284
.font-sans.text-sm.leading-sm.capsize::before,
291285
.font-sans .text-sm.leading-sm.capsize::before,

0 commit comments

Comments
 (0)