-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to ESLint 9.0 #6562
Comments
This comment was marked as spam.
This comment was marked as spam.
Hi @buffalojoec I can take care of this. |
@andiz2 Thank you!! |
Currently struggleing with the build.. stable-x86_64-unknown-linux-gnu unchanged - rustc 1.77.2 (25ef9e3d8 2024-04-09) info: cleaning up downloads & tmp directories Caused by:
|
@andiz2 What caused this originally? You shouldn't need to mess with Cargo to work with JS, unless you're trying to run the e2e tests, which aren't really necessary for testing the linter. Ideally you just need to get In any case, your solana CLI version is out-of-date. |
I will ignore Cargo and make pnpm lint work for the new version. If I'll have further Q I'll let you know. |
I've used @solana/spl-account-compression:lint: /mnt/c/Users/admin/Documents/code js/spl-fork/solana-program-library/account-compression/sdk/src/generated/instructions/append.ts Am I doing something wrong? |
From what I've researched lately SPL have this ESLint config dependency: "@solana/eslint-config-solana": "^3.0.3", ...btw.. |
I don't think
I've added a PR to update this! #6613 There's some more linting issues I noticed. For example, some packages (like |
I took a crack at this today: // ./libraries/type-length-value/js/eslint.config.cjs
const js = require('@eslint/js');
const PrettierPlugin = require('eslint-plugin-prettier');
const TypeScriptPlugin = require('@typescript-eslint/eslint-plugin');
const TypeScriptParser = require('@typescript-eslint/parser');
const RequireExtensionsPlugin = require('eslint-plugin-require-extensions');
/** @type {import('eslint').Linter.FlatConfig[]} */
module.exports = [
js.configs.recommended,
TypeScriptPlugin.configs.recommended,
PrettierPlugin.configs.recommended,
RequireExtensionsPlugin.configs.recommended,
{
ignores: ['docs', 'lib', 'test-ledger', 'package-lock.json'],
languageOptions: {
parser: TypeScriptParser,
},
plugins: {
'@typescript-eslint': TypeScriptPlugin,
prettier: PrettierPlugin,
'require-extensions': RequireExtensionsPlugin,
},
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/consistent-type-imports': 'error',
},
},
{
files: ['examples/**/*', 'test/**/*'],
rules: {
'require-extensions/require-extensions': 'off',
'require-extensions/require-index': 'off',
},
},
]; Until all of the plugins ( |
I mean, I guess we could just set |
Yeah I definitely didn't want to upgrade to 9 without using flat config. |
I'll put this on hold until further news |
Problem
The new ESLint 9.0 update is out, and Dependabot has tried upgrading SPL to it, but it has many breaking changes.
For example, ESLint 9 uses a new config file structure, as well as some different CLI flags and configuration keys.
https://eslint.org/docs/latest/use/migrate-to-9.0.0
Solution
Go through the migration guide and upgrade SPL to ES Lint 9.0!
The text was updated successfully, but these errors were encountered: