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.42.1
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.0
Choose a head ref
  • 11 commits
  • 15 files changed
  • 1 contributor

Commits on Sep 18, 2023

  1. Copy the full SHA
    8c5a7d6 View commit details
  2. chore: update deps

    antfu committed Sep 18, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1e6f866 View commit details
  3. chore: release v0.43.0-beta.0

    antfu committed Sep 18, 2023
    Copy the full SHA
    f7aa1cf View commit details

Commits on Sep 19, 2023

  1. chore: update deps

    antfu committed Sep 19, 2023
    Copy the full SHA
    259c65a View commit details
  2. Copy the full SHA
    35f9f2e View commit details
  3. chore: release v0.43.0-beta.1

    antfu committed Sep 19, 2023
    Copy the full SHA
    f43363a View commit details
  4. Copy the full SHA
    a6861f4 View commit details
  5. Copy the full SHA
    b6f7400 View commit details
  6. chore: release v0.43.0-beta.2

    antfu committed Sep 19, 2023
    Copy the full SHA
    96e547a View commit details
  7. fix: tsconfig lint not enabled

    antfu committed Sep 19, 2023
    Copy the full SHA
    aca3051 View commit details
  8. chore: release v0.43.0

    antfu committed Sep 19, 2023
    Copy the full SHA
    f0f499e View commit details
5 changes: 4 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"extends": "@antfu"
"extends": [
"@antfu",
"plugin:@stylistic/migrate/recommended"
]
}
18 changes: 9 additions & 9 deletions fixtures/vitesse/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "module",
"private": true,
"packageManager": "pnpm@8.7.5",
"packageManager": "pnpm@8.7.6",
"scripts": {
"build": "vite-ssg build",
"dev": "vite --port 3333 --open",
@@ -17,16 +17,16 @@
"dependencies": {
"@unocss/reset": "^0.55.7",
"@vueuse/core": "^10.4.1",
"@vueuse/head": "^1.3.1",
"@vueuse/head": "^2.0.0",
"nprogress": "^0.2.0",
"pinia": "^2.1.6",
"vue": "^3.3.4",
"vue-demi": "^0.14.6",
"vue-i18n": "^9.4.0",
"vue-i18n": "^9.4.1",
"vue-router": "^4.2.4"
},
"devDependencies": {
"@antfu/eslint-config": "^0.41.0",
"@antfu/eslint-config": "^0.42.1",
"@iconify-json/carbon": "^1.1.21",
"@intlify/vite-plugin-vue-i18n": "^7.0.0",
"@types/markdown-it-link-attributes": "^3.0.1",
@@ -35,13 +35,13 @@
"@vue/test-utils": "^2.4.1",
"critters": "^0.0.20",
"cross-env": "^7.0.3",
"cypress": "^13.1.0",
"cypress": "^13.2.0",
"eslint": "^8.49.0",
"eslint-plugin-cypress": "^2.14.0",
"eslint-plugin-cypress": "^2.15.1",
"https-localhost": "^4.7.1",
"markdown-it-link-attributes": "^4.0.1",
"markdown-it-shiki": "^0.9.0",
"pnpm": "^8.7.5",
"pnpm": "^8.7.6",
"shiki": "^0.14.4",
"taze": "^0.11.2",
"typescript": "^5.2.2",
@@ -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.1",
"vite-ssg": "^0.23.2",
"vite-ssg-sitemap": "^0.5.1",
"vitest": "^0.34.4",
"vue-tsc": "^1.8.10"
"vue-tsc": "^1.8.11"
}
}
5 changes: 3 additions & 2 deletions fixtures/vitesse/src/auto-imports.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
// Generated by 'unplugin-auto-import'
// for vue template auto import
import type { UnwrapRef } from 'vue'

export {}
declare global {
const $$: typeof import('vue/macros')['$$']
@@ -270,8 +273,6 @@ declare global {
const watchWithFilter: typeof import('@vueuse/core')['watchWithFilter']
const whenever: typeof import('@vueuse/core')['whenever']
}
// for vue template auto import
import { UnwrapRef } from 'vue'
declare module '@vue/runtime-core' {
interface ComponentCustomProperties {
readonly $$: UnwrapRef<typeof import('vue/macros')['$$']>
6 changes: 4 additions & 2 deletions fixtures/vitesse/src/shims.d.ts
Original file line number Diff line number Diff line change
@@ -5,12 +5,14 @@ declare interface Window {
// with vite-plugin-vue-markdown, markdown files can be treated as Vue components
declare module '*.md' {
import { type DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>

const component: DefineComponent<object, object, any>
export default component
}

declare module '*.vue' {
import { type DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>

const component: DefineComponent<object, object, any>
export default component
}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@antfu/eslint-config-monorepo",
"version": "0.42.1",
"version": "0.43.0",
"private": true,
"packageManager": "pnpm@8.7.5",
"packageManager": "pnpm@8.7.6",
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
"license": "MIT",
"scripts": {
@@ -14,6 +14,7 @@
},
"devDependencies": {
"@antfu/eslint-config": "workspace:*",
"@stylistic/eslint-plugin-migrate": "^0.0.3",
"bumpp": "^9.2.0",
"eslint": "^8.49.0",
"eslint-plugin-antfu": "link:./packages/eslint-plugin-antfu",
93 changes: 48 additions & 45 deletions packages/eslint-config-basic/index.js
Original file line number Diff line number Diff line change
@@ -20,7 +20,6 @@ module.exports = {
],
ignorePatterns: [
'*.min.*',
'*.d.ts',
'CHANGELOG.md',
'dist',
'LICENSE*',
@@ -57,6 +56,7 @@ module.exports = {
'no-only-tests',
'unused-imports',
'jsdoc',
'@stylistic/js',
],
settings: {
'import/resolver': {
@@ -83,7 +83,7 @@ module.exports = {
files: ['*.yaml', '*.yml'],
parser: 'yaml-eslint-parser',
rules: {
'spaced-comment': 'off',
'@stylistic/js/spaced-comment': 'off',
},
},
{
@@ -168,6 +168,8 @@ module.exports = {
files: ['*.d.ts'],
rules: {
'import/no-duplicates': 'off',
'unused-imports/no-unused-vars': 'off',
'eslint-comments/no-unlimited-disable': 'off',
},
},
{
@@ -201,31 +203,37 @@ module.exports = {
// Code blocks in markdown file
files: ['**/*.md/*.*'],
rules: {
'no-alert': 'off',
'no-console': 'off',
'no-restricted-imports': 'off',
'no-undef': 'off',
'no-unused-expressions': 'off',
'no-unused-vars': 'off',

'@typescript-eslint/no-redeclare': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/comma-dangle': 'off',
'@typescript-eslint/consistent-type-imports': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-require-imports': 'off',
'import/no-unresolved': 'off',

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

'unused-imports/no-unused-imports': 'off',
'unused-imports/no-unused-vars': 'off',
'no-alert': 'off',
'no-console': 'off',
'no-restricted-imports': 'off',
'no-undef': 'off',
'no-unused-expressions': 'off',
'no-unused-vars': 'off',

'import/no-unresolved': 'off',

'antfu/no-cjs-exports': 'off',
'antfu/no-ts-export-equal': 'off',

'n/prefer-global/process': 'off',
},
},
],
rules: {
// import
// Import
'import/order': 'error',
'import/first': 'error',
'import/no-mutable-exports': 'error',
@@ -247,37 +255,47 @@ module.exports = {
{ vars: 'all', varsIgnorePattern: '^_', args: 'after-used', argsIgnorePattern: '^_' },
],

// Stylistic
'@stylistic/js/array-bracket-spacing': ['error', 'never'],
'@stylistic/js/block-spacing': ['error', 'always'],
'@stylistic/js/comma-spacing': ['error', { before: false, after: true }],
'@stylistic/js/func-call-spacing': 'off',
'@stylistic/js/generator-star-spacing': 'off',
'@stylistic/js/indent': ['error', 2, { SwitchCase: 1, VariableDeclarator: 1, outerIIFEBody: 1 }],
'@stylistic/js/key-spacing': ['error', { beforeColon: false, afterColon: true }],
'@stylistic/js/no-multi-spaces': 'error',
'@stylistic/js/object-curly-spacing': ['error', 'always'],
'@stylistic/js/operator-linebreak': ['error', 'before'],
'@stylistic/js/space-before-function-paren': ['error', { anonymous: 'always', named: 'never', asyncArrow: 'always' }],
'@stylistic/js/template-curly-spacing': 'error',
'@stylistic/js/brace-style': ['error', 'stroustrup', { allowSingleLine: true }],
'@stylistic/js/comma-style': ['error', 'last'],
'@stylistic/js/spaced-comment': ['error', 'always', {
line: {
markers: ['/'],
exceptions: ['/', '#'],
},
block: {
markers: ['!'],
exceptions: ['*'],
balanced: true,
},
}],

'no-param-reassign': 'off',
'array-bracket-spacing': ['error', 'never'],
'brace-style': ['error', 'stroustrup', { allowSingleLine: true }],
'block-spacing': ['error', 'always'],
'camelcase': 'off',
'comma-spacing': ['error', { before: false, after: true }],
'comma-style': ['error', 'last'],
'comma-dangle': ['error', 'always-multiline'],
'no-constant-condition': 'warn',
'no-debugger': 'error',
'no-console': ['error', { allow: ['warn', 'error'] }],
'no-cond-assign': ['error', 'always'],
'func-call-spacing': 'off',
'key-spacing': ['error', { beforeColon: false, afterColon: true }],
'indent': ['error', 2, { SwitchCase: 1, VariableDeclarator: 1, outerIIFEBody: 1 }],
'no-restricted-syntax': [
'error',
'DebuggerStatement',
'LabeledStatement',
'WithStatement',
],
'object-curly-spacing': ['error', 'always'],
'no-return-await': 'off',
'space-before-function-paren': [
'error',
{
anonymous: 'always',
named: 'never',
asyncArrow: 'always',
},
],
'no-restricted-globals': [
'error',
{ name: 'global', message: 'Use `globalThis` instead.' },
@@ -292,7 +310,7 @@ module.exports = {
{ property: '__lookupSetter__', message: 'Use `Object.getOwnPropertyDescriptor` instead.' },
],

// es6
// ES6
'no-var': 'error',
'prefer-const': [
'error',
@@ -320,20 +338,7 @@ module.exports = {
'prefer-rest-params': 'error',
'prefer-spread': 'error',
'prefer-template': 'error',
'template-curly-spacing': 'error',
'arrow-parens': ['error', 'as-needed', { requireForBlockBody: true }],
'generator-star-spacing': 'off',
'spaced-comment': ['error', 'always', {
line: {
markers: ['/'],
exceptions: ['/', '#'],
},
block: {
markers: ['!'],
exceptions: ['*'],
balanced: true,
},
}],

// best-practice
'array-callback-return': 'error',
@@ -343,7 +348,6 @@ module.exports = {
'eqeqeq': ['error', 'smart'],
'no-alert': 'warn',
'no-case-declarations': 'error',
'no-multi-spaces': 'error',
'no-multi-str': 'error',
'no-with': 'error',
'no-void': 'error',
@@ -352,10 +356,9 @@ module.exports = {
'vars-on-top': 'error',
'require-await': 'off',
'no-return-assign': 'off',
'operator-linebreak': ['error', 'before'],
'max-statements-per-line': ['error', { max: 1 }],

// node
// Node
'n/prefer-global/process': ['error', 'never'],
'n/prefer-global/buffer': ['error', 'never'],
'n/no-callback-literal': 'off',
5 changes: 3 additions & 2 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.42.1",
"version": "0.43.0",
"description": "",
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
"license": "MIT",
@@ -19,11 +19,12 @@
"eslint": ">=7.4.0"
},
"dependencies": {
"@stylistic/eslint-plugin-js": "0.0.3",
"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.6.0",
"eslint-plugin-jsdoc": "^46.8.1",
"eslint-plugin-jsonc": "^2.9.0",
"eslint-plugin-markdown": "^3.0.1",
"eslint-plugin-n": "^16.1.0",
Loading