Skip to content

Commit

Permalink
Upgrade: Bump @zazen/eslint-config from 2.1.0 to 2.3.0 (#73)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
dependabot[bot] and stormwarning authored Sep 21, 2021
1 parent 110e54d commit dc361f3
Show file tree
Hide file tree
Showing 7 changed files with 579 additions and 106 deletions.
30 changes: 15 additions & 15 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
module.exports = {
extends: ['@zazen/eslint-config'],
plugins: ['@typescript-eslint'],
rules: {},
extends: ['@zazen/eslint-config/typescript'],
env: {
node: true,
},
rules: {
'@typescript-eslint/indent': 'off',
'@typescript-eslint/space-before-function-paren': 'off',

'@typescript-eslint/explicit-function-return-type': 'off',
},
overrides: [
{
files: ['**/*.ts'],
extends: [
'@zazen/eslint-config',
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/src/configs/recommended.json
'plugin:@typescript-eslint/recommended',
// https://github.com/prettier/eslint-config-prettier/blob/master/%40typescript-eslint.js
'prettier/@typescript-eslint',
// Jest config
files: [
'**/__tests__/**/*.{js,ts,tsx}',
'**/*.@(spec|test).{js,ts,tsx}',
],
parser: '@typescript-eslint/parser',
env: {
node: true,
},
rules: {
'prefer-const': 'off',
jest: true,
},
},
],
Expand Down
14 changes: 4 additions & 10 deletions __tests__/plugin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const THEME_CONFIG = {
}

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

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

describe('Plugin', () => {
it('generates utility classes with a default root size', async () => {
return postcss(
return await postcss(
tailwindcss({
theme: {
...THEME_CONFIG,
Expand All @@ -69,8 +69,6 @@ describe('Plugin', () => {
from: undefined,
})
.then((result) => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
expect(result.css).toMatchCss(`
.font-sans.text-sm.leading-sm.capsize::before,
.font-sans .text-sm.leading-sm.capsize::before,
Expand Down Expand Up @@ -156,7 +154,7 @@ describe('Plugin', () => {
})

it('generates utility classes with a custom root size', async () => {
return postcss(
return await postcss(
tailwindcss({
theme: {
...THEME_CONFIG,
Expand All @@ -177,8 +175,6 @@ describe('Plugin', () => {
from: undefined,
})
.then((result) => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
expect(result.css).toMatchCss(`
.font-sans.text-sm.leading-sm.capsize::before,
.font-sans .text-sm.leading-sm.capsize::before,
Expand Down Expand Up @@ -264,7 +260,7 @@ describe('Plugin', () => {
})

it('works with unitless or percentage line-height values', async () => {
return postcss(
return await postcss(
tailwindcss({
theme: {
...THEME_CONFIG,
Expand All @@ -284,8 +280,6 @@ describe('Plugin', () => {
from: undefined,
})
.then((result) => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
expect(result.css).toMatchCss(`
.font-sans.text-sm.leading-sm.capsize::before,
.font-sans .text-sm.leading-sm.capsize::before,
Expand Down
Loading

0 comments on commit dc361f3

Please sign in to comment.