Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: antfu/eslint-config
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.43.0
Choose a base ref
...
head repository: antfu/eslint-config
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.43.1
Choose a head ref
  • 4 commits
  • 13 files changed
  • 2 contributors

Commits on Sep 20, 2023

  1. Copy the full SHA
    1fa1703 View commit details

Commits on Sep 21, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    711d3ec View commit details
  2. chore: update deps

    antfu committed Sep 21, 2023
    Copy the full SHA
    23cf3bf View commit details
  3. chore: release v0.43.1

    antfu committed Sep 21, 2023
    Copy the full SHA
    6254fa8 View commit details
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -10,6 +10,8 @@
- Reasonable defaults, best practices, only one-line of config
- **Style principle**: Minimal for reading, stable for diff

> Configs uses [ESLint Stylistic](https://github.com/eslint-stylistic/eslint-stylistic)
## Usage

### Install
@@ -51,11 +53,21 @@ Add the following settings to your `settings.json`:
{
"prettier.enable": false,
"editor.formatOnSave": false,

// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.organizeImports": false
},

// Silent the stylistic rules in you IDE, but still auto fix them
"eslint.rules.customizations": [
{
"rule": "@stylistic/*",
"severity": "off"
}
],

// The following is optional.
// It's better to put under project setting `.vscode/settings.json`
// to avoid conflicts with working with different eslint configs
10 changes: 5 additions & 5 deletions fixtures/vitesse/package.json
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
"up": "taze major -I"
},
"dependencies": {
"@unocss/reset": "^0.55.7",
"@unocss/reset": "^0.56.0",
"@vueuse/core": "^10.4.1",
"@vueuse/head": "^2.0.0",
"nprogress": "^0.2.0",
@@ -26,7 +26,7 @@
"vue-router": "^4.2.4"
},
"devDependencies": {
"@antfu/eslint-config": "^0.42.1",
"@antfu/eslint-config": "^0.43.0",
"@iconify-json/carbon": "^1.1.21",
"@intlify/vite-plugin-vue-i18n": "^7.0.0",
"@types/markdown-it-link-attributes": "^3.0.1",
@@ -45,7 +45,7 @@
"shiki": "^0.14.4",
"taze": "^0.11.2",
"typescript": "^5.2.2",
"unocss": "^0.55.7",
"unocss": "^0.56.0",
"unplugin-auto-import": "^0.16.6",
"unplugin-vue-components": "^0.25.2",
"vite": "^4.4.9",
@@ -54,9 +54,9 @@
"vite-plugin-pwa": "^0.16.5",
"vite-plugin-vue-layouts": "^0.8.0",
"vite-plugin-vue-markdown": "^0.23.8",
"vite-ssg": "^0.23.2",
"vite-ssg": "^0.23.3",
"vite-ssg-sitemap": "^0.5.1",
"vitest": "^0.34.4",
"vue-tsc": "^1.8.11"
"vue-tsc": "^1.8.13"
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antfu/eslint-config-monorepo",
"version": "0.43.0",
"version": "0.43.1",
"private": true,
"packageManager": "pnpm@8.7.6",
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
@@ -14,7 +14,7 @@
},
"devDependencies": {
"@antfu/eslint-config": "workspace:*",
"@stylistic/eslint-plugin-migrate": "^0.0.3",
"@stylistic/eslint-plugin-migrate": "^0.0.4",
"bumpp": "^9.2.0",
"eslint": "^8.49.0",
"eslint-plugin-antfu": "link:./packages/eslint-plugin-antfu",
4 changes: 2 additions & 2 deletions packages/eslint-config-basic/index.js
Original file line number Diff line number Diff line change
@@ -218,8 +218,8 @@ module.exports = {
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-require-imports': 'off',

'@stylistic/ts/comma-dangle': 'off',
'@typescript-eslint/comma-dangle': 'off',

'unused-imports/no-unused-imports': 'off',
'unused-imports/no-unused-vars': 'off',

6 changes: 3 additions & 3 deletions packages/eslint-config-basic/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antfu/eslint-config-basic",
"version": "0.43.0",
"version": "0.43.1",
"description": "",
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
"license": "MIT",
@@ -19,12 +19,12 @@
"eslint": ">=7.4.0"
},
"dependencies": {
"@stylistic/eslint-plugin-js": "0.0.3",
"@stylistic/eslint-plugin-js": "0.0.4",
"eslint-plugin-antfu": "workspace:*",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-html": "^7.1.0",
"eslint-plugin-import": "npm:eslint-plugin-i@2.28.1",
"eslint-plugin-jsdoc": "^46.8.1",
"eslint-plugin-jsdoc": "^46.8.2",
"eslint-plugin-jsonc": "^2.9.0",
"eslint-plugin-markdown": "^3.0.1",
"eslint-plugin-n": "^16.1.0",
2 changes: 1 addition & 1 deletion packages/eslint-config-basic/standard.js
Original file line number Diff line number Diff line change
@@ -171,7 +171,7 @@ module.exports = {
'valid-typeof': ['error', { requireStringLiterals: true }],
'wrap-iife': ['error', 'any', { functionPrototypeMethods: true }],
'yoda': ['error', 'never'],

// Stylistic
'@stylistic/js/no-tabs': 'error',
'@stylistic/js/array-bracket-spacing': ['error', 'never'],
2 changes: 1 addition & 1 deletion packages/eslint-config-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antfu/eslint-config-react",
"version": "0.43.0",
"version": "0.43.1",
"description": "",
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
"license": "MIT",
4 changes: 1 addition & 3 deletions packages/eslint-config-ts/index.js
Original file line number Diff line number Diff line change
@@ -222,10 +222,8 @@ module.exports = {
'@typescript-eslint/quotes': ['error', 'single'],
'no-extra-parens': 'off',
'@typescript-eslint/no-extra-parens': ['error', 'functions'],

// Stylistic JS/TS Misalignments (should be fixed upstream)
'comma-dangle': 'off',
'@stylistic/ts/comma-dangle': ['error', 'always-multiline'],
'@typescript-eslint/comma-dangle': ['error', 'always-multiline'],

// Stylistic JS/TS
'@stylistic/js/space-before-blocks': 'off',
4 changes: 2 additions & 2 deletions packages/eslint-config-ts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antfu/eslint-config-ts",
"version": "0.43.0",
"version": "0.43.1",
"description": "",
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
"license": "MIT",
@@ -18,7 +18,7 @@
},
"dependencies": {
"@antfu/eslint-config-basic": "workspace:*",
"@stylistic/eslint-plugin-ts": "0.0.3",
"@stylistic/eslint-plugin-ts": "0.0.4",
"@typescript-eslint/eslint-plugin": "^6.7.2",
"@typescript-eslint/parser": "^6.7.2",
"eslint-plugin-jest": "^27.4.0"
2 changes: 1 addition & 1 deletion packages/eslint-config-vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antfu/eslint-config-vue",
"version": "0.43.0",
"version": "0.43.1",
"description": "",
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
"license": "MIT",
2 changes: 1 addition & 1 deletion packages/eslint-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antfu/eslint-config",
"version": "0.43.0",
"version": "0.43.1",
"description": "Anthony's ESLint config",
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
"license": "MIT",
4 changes: 2 additions & 2 deletions packages/eslint-plugin-antfu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-antfu",
"version": "0.43.0",
"version": "0.43.1",
"license": "MIT",
"homepage": "https://github.com/antfu/eslint-config",
"main": "./dist/index.cjs",
@@ -18,7 +18,7 @@
"@typescript-eslint/utils": "^6.7.2"
},
"devDependencies": {
"@types/node": "^20.6.2",
"@types/node": "^20.6.3",
"@typescript-eslint/rule-tester": "^6.7.2",
"unbuild": "^2.0.0",
"vitest": "^0.34.4"
Loading