Commit graph

1972 commits

Author SHA1 Message Date
vercel-release-bot
4df90ac6ff v14.3.0-canary.83 2024-05-26 10:42:09 +00:00
vercel-release-bot
20201a11a2 v14.3.0-canary.82 2024-05-25 23:21:46 +00:00
vercel-release-bot
0f1d9e9f7b v14.3.0-canary.81 2024-05-24 23:21:57 +00:00
vercel-release-bot
dfe7fc03e2 v14.3.0-canary.80 2024-05-23 23:23:20 +00:00
vercel-release-bot
7fe4f41e13 v14.3.0-canary.79 2024-05-23 14:45:18 +00:00
vercel-release-bot
24180bda25 v14.3.0-canary.78 2024-05-23 02:39:11 +00:00
vercel-release-bot
74be1f68c2 v14.3.0-canary.77 2024-05-22 23:23:25 +00:00
vercel-release-bot
d299bbf431 v14.3.0-canary.76 2024-05-21 23:23:05 +00:00
vercel-release-bot
22f822ebb7 v14.3.0-canary.75 2024-05-21 21:18:04 +00:00
vercel-release-bot
5cba51e342 v14.3.0-canary.74 2024-05-21 19:54:31 +00:00
vercel-release-bot
49c1e127aa v14.3.0-canary.73 2024-05-20 23:23:18 +00:00
vercel-release-bot
14a98734e3 v14.3.0-canary.72 2024-05-20 10:35:37 +00:00
vercel-release-bot
3843166730 v14.3.0-canary.71 2024-05-18 23:21:55 +00:00
vercel-release-bot
9c31149967 v14.3.0-canary.70 2024-05-17 23:23:12 +00:00
vercel-release-bot
48b91dcc0b v14.3.0-canary.69 2024-05-17 21:19:07 +00:00
vercel-release-bot
cd5287e932 v14.3.0-canary.68 2024-05-16 23:22:25 +00:00
vercel-release-bot
f6a242474c v14.3.0-canary.67 2024-05-16 21:16:20 +00:00
vercel-release-bot
531f7c2dda v14.3.0-canary.66 2024-05-16 20:04:48 +00:00
vercel-release-bot
84014c2971 v14.3.0-canary.65 2024-05-16 18:15:02 +00:00
vercel-release-bot
5469e6427b v14.3.0-canary.64 2024-05-16 09:25:50 +00:00
vercel-release-bot
4229ff4e4d v14.3.0-canary.63 2024-05-14 23:21:46 +00:00
vercel-release-bot
caf261288e v14.3.0-canary.62 2024-05-14 18:13:36 +00:00
vercel-release-bot
8dea9963d7 v14.3.0-canary.61 2024-05-13 23:22:28 +00:00
vercel-release-bot
9561a2988b v14.3.0-canary.60 2024-05-13 20:22:10 +00:00
vercel-release-bot
9296434815 v14.3.0-canary.59 2024-05-12 23:22:32 +00:00
vercel-release-bot
c26840909c v14.3.0-canary.58 2024-05-11 23:21:54 +00:00
vercel-release-bot
b9af6a9b22 v14.3.0-canary.57 2024-05-10 23:22:03 +00:00
vercel-release-bot
406a11eefe v14.3.0-canary.56 2024-05-10 22:30:08 +00:00
vercel-release-bot
505fc7b259 v14.3.0-canary.55 2024-05-10 21:18:58 +00:00
vercel-release-bot
cc10bf5d1f v14.3.0-canary.54 2024-05-09 23:22:54 +00:00
vercel-release-bot
c3c0c4f8a3 v14.3.0-canary.53 2024-05-09 17:22:50 +00:00
vercel-release-bot
718d94a21c v14.3.0-canary.52 2024-05-09 11:01:48 +00:00
vercel-release-bot
067eac6383 v14.3.0-canary.51 2024-05-08 23:22:49 +00:00
vercel-release-bot
5ff2731c58 v14.3.0-canary.50 2024-05-08 19:53:50 +00:00
hrmny
64b718c661
chore: update prettier to 3.2.5 (#65092) 2024-05-08 21:47:14 +02:00
vercel-release-bot
e61db9298d v14.3.0-canary.49 2024-05-08 08:43:30 +00:00
vercel-release-bot
715e157cba v14.3.0-canary.48 2024-05-08 06:38:45 +00:00
vercel-release-bot
0edf4f951e v14.3.0-canary.47 2024-05-07 23:20:36 +00:00
vercel-release-bot
aa9d3f2d3e v14.3.0-canary.46 2024-05-07 21:29:02 +00:00
vercel-release-bot
b91019df41 v14.3.0-canary.45 2024-05-07 18:49:12 +00:00
vercel-release-bot
69baf6d8ae v14.3.0-canary.44 2024-05-06 23:21:59 +00:00
vercel-release-bot
180d4f5a6e v14.3.0-canary.43 2024-05-06 22:21:45 +00:00
Markus Renken
d8e866686d
fix: replace deprecated/removed functions in eslint-plugin-next (#64251)
<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->

Hi everyone, this is my first PR to such a large project so please be
gentle. 😄 I'm also new to publishing packages so I'm not sure if I'm
missing any steps.

ESLint 9.0.0 came out a few days ago and unfortunately,
`eslint-plugin-next` is not compatible as it uses deprecated (and with
ESLint 9.0.0 removed) functions.
In this PR, I replaced the deprecated functions with the suggested
replacements ([check this
out](https://eslint.org/blog/2023/09/preparing-custom-rules-eslint-v9/)).

Regarding backwards compatibility, everything I used is available since
ESLint 8.40 (released May 2023). I'm not sure how far back Next.js
support goes but it feels fine to me.

I successfully tested some rules locally with ESLint 9.0.0 and this
`eslint.config.js` (flat config format):
```js
import js from '@eslint/js';
import nextPlugin from '@next/eslint-plugin-next';
import prettierRecommended from 'eslint-plugin-prettier/recommended';
import importSortPlugin from 'eslint-plugin-simple-import-sort';
import globals from 'globals';
import tseslint from 'typescript-eslint';

/**
 * TypeScript config with strict type checking and no type checking for JS files.
 */
const typeScriptConfig = [
  ...tseslint.configs.strictTypeChecked,
  {
    plugins: {
      '@typescript-eslint': tseslint.plugin,
    },
    languageOptions: {
      parser: tseslint.parser,
      parserOptions: {
        project: true,
      },
    },
  },
  {
    // disable type-aware linting on JS files
    files: ['**/*.js', '**/*.mjs', '**/*.cjs'],
    ...tseslint.configs.disableTypeChecked,
  },
];

/**
 * Next.js config with recommended and core web vitals rules.
 */
const nextConfig = {
  plugins: {
    '@next/next': nextPlugin,
  },
  rules: {
    ...nextPlugin.configs.recommended.rules,
    ...nextPlugin.configs['core-web-vitals'].rules,
  },
};

/**
 * Import sort config with simple-import-sort plugin.
 */
const importSortConfig = {
  plugins: {
    'simple-import-sort': importSortPlugin,
  },
  rules: {
    'simple-import-sort/imports': 'error',
    'simple-import-sort/exports': 'error',
  },
};

/**
 * The final ESLint config wrapped with the tseslint.config helper for type hinting.
 */
export default tseslint.config(
  {
    ignores: ['.next', '.yarn', '**/*.d.ts', 'node_modules'],
  },
  {
    languageOptions: {
      globals: {
        ...globals.browser,
        ...globals.node,
      },
    },
  },
  js.configs.recommended,
  ...typeScriptConfig,
  nextConfig,
  prettierRecommended,
  importSortConfig,
);

```

It has a few more configs but I'm sure you can remove most of them. The
important one is the `nextConfig`. Also important: Run `eslint` and not
`next lint`, it's currently not compatible with the new flat config
format.

Related discussion: https://github.com/vercel/next.js/discussions/54238

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2024-05-06 14:22:18 -07:00
vercel-release-bot
e5b1d50101 v14.3.0-canary.42 2024-05-06 18:36:15 +00:00
vercel-release-bot
b6d07bfa82 v14.3.0-canary.41 2024-05-06 15:26:55 +00:00
vercel-release-bot
1ae14bafdb v14.3.0-canary.40 2024-05-05 23:21:26 +00:00
vercel-release-bot
c9291d6dd5 v14.3.0-canary.39 2024-05-04 23:21:52 +00:00
vercel-release-bot
7ee16934e9 v14.3.0-canary.38 2024-05-03 23:22:07 +00:00
vercel-release-bot
50f3823d7e v14.3.0-canary.37 2024-05-02 23:23:31 +00:00
vercel-release-bot
6475431a4c v14.3.0-canary.36 2024-05-01 23:22:31 +00:00