From a8d210eb869f275f989c6afa28483dffc7b9d5c1 Mon Sep 17 00:00:00 2001 From: Mykhaylo Ryechkin <5657181+mryechkin@users.noreply.github.com> Date: Thu, 30 Jun 2022 12:06:25 -0400 Subject: [PATCH] feat: Bumping deps and fixing usage of TailwindCSS plugin --- README.md | 3 ++- index.js | 7 ++++++- lib/base.js | 15 +++++---------- lib/next.js | 4 ++-- lib/react.js | 4 ++-- package.json | 18 +++++++++--------- 6 files changed, 26 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 4c5e0e2..eeed9a0 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ This will install the shared config, as well as its peer dependencies: - eslint-plugin-react - eslint-plugin-react-hooks - eslint-plugin-simple-import-sort +- eslint-plugin-tailwindcss - prettier - prettier-plugin-tailwindcss @@ -120,7 +121,7 @@ If you wish to override any [Prettier options](https://prettier.io/docs/en/optio ```jsx // .eslintrc { - "extends": ["@acme"], + "extends": ["acme"], "rules": { "prettier/prettier": [ "error", diff --git a/index.js b/index.js index 624559f..007f6eb 100644 --- a/index.js +++ b/index.js @@ -3,7 +3,12 @@ const next = require('./lib/next.js'); const react = require('./lib/react.js'); module.exports = { - extends: ['airbnb', 'airbnb/hooks', 'plugin:prettier/recommended'], + extends: [ + 'airbnb', + 'airbnb/hooks', + 'plugin:prettier/recommended', + 'plugin:tailwindcss/recommended', + ], env: { browser: true, commonjs: true, diff --git a/lib/base.js b/lib/base.js index 5680731..92592fb 100644 --- a/lib/base.js +++ b/lib/base.js @@ -5,7 +5,7 @@ module.exports = { devDependencies: true, }, ], - 'import/prefer-default-export': 0, + 'import/prefer-default-export': 'off', 'import/first': 'error', 'import/newline-after-import': 'error', 'import/no-duplicates': 'error', @@ -33,14 +33,9 @@ module.exports = { }, ], 'simple-import-sort/exports': 'error', - 'tailwindcss/classnames-order': [ - 'warn', - { - officialSorting: true, - }, - ], + 'tailwindcss/classnames-order': 'off', 'no-console': 'warn', - 'no-nested-ternary': 0, - 'no-underscore-dangle': 0, - 'no-use-before-define': 0, + 'no-nested-ternary': 'off', + 'no-underscore-dangle': 'off', + 'no-use-before-define': 'off', }; diff --git a/lib/next.js b/lib/next.js index 2f517ec..73dc23f 100644 --- a/lib/next.js +++ b/lib/next.js @@ -1,6 +1,6 @@ module.exports = { // Next.js overrides - 'jsx-a11y/href-no-hash': 0, + 'jsx-a11y/href-no-hash': 'off', 'jsx-a11y/anchor-is-valid': [ 'error', { @@ -9,5 +9,5 @@ module.exports = { aspects: ['invalidHref', 'preferButton'], }, ], - 'react/react-in-jsx-scope': 0, + 'react/react-in-jsx-scope': 'off', }; diff --git a/lib/react.js b/lib/react.js index 9f88882..fcf440b 100644 --- a/lib/react.js +++ b/lib/react.js @@ -5,6 +5,6 @@ module.exports = { extensions: ['.js', '.jsx'], }, ], - 'react/jsx-props-no-spreading': 0, - 'react/prop-types': 0, + 'react/jsx-props-no-spreading': 'off', + 'react/prop-types': 'off', }; diff --git a/package.json b/package.json index 592b6dd..be6ede3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-acme", - "version": "1.3.1", + "version": "1.4.0", "description": "ESLint + Prettier config for React (Next.js)", "main": "index.js", "files": [ @@ -14,19 +14,19 @@ "lint:fix": "eslint --fix" }, "peerDependencies": { - "eslint": "^8.13.0", + "eslint": "^8.18.0", "eslint-config-airbnb": "^19.0.4", "eslint-config-prettier": "^8.5.0", "eslint-import-resolver-alias": "^1.1.2", "eslint-plugin-import": "^2.26.0", - "eslint-plugin-jsx-a11y": "^6.5.1", - "eslint-plugin-prettier": "^4.0.0", - "eslint-plugin-react": "^7.29.4", - "eslint-plugin-react-hooks": "^4.4.0", + "eslint-plugin-jsx-a11y": "^6.6.0", + "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-react": "^7.30.1", + "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-simple-import-sort": "^7.0.0", - "eslint-plugin-tailwindcss": "^3.5.0", - "prettier": "^2.6.2", - "prettier-plugin-tailwindcss": "^0.1.8" + "eslint-plugin-tailwindcss": "^3.6.0", + "prettier": "^2.7.1", + "prettier-plugin-tailwindcss": "^0.1.11" }, "keywords": [ "config",