Giter Site home page Giter Site logo

Comments (8)

dmitriyrotaenko avatar dmitriyrotaenko commented on August 17, 2024 4

The problem is still alive in eslint ^9.2.0. Should I open another issue?

from eslint-plugin-security.

nzakas avatar nzakas commented on August 17, 2024 3

Thanks for the report, I'll take a look.

from eslint-plugin-security.

flowerhahaha avatar flowerhahaha commented on August 17, 2024 1

I got the same issue, and I didn't use eslint-plugin-security in my project.
I've upgraded all the related packages to the latest and the problem still alive. Any suggestions? Thanks a lot.

from eslint-plugin-security.

aladdin-add avatar aladdin-add commented on August 17, 2024

@dmitriyrotaenko please file a new issue with a repro, thanks! 🙏

from eslint-plugin-security.

AlwaysLoveme avatar AlwaysLoveme commented on August 17, 2024

The problem is still alive in eslint ^9.2.0. Should I open another issue?

same here:

eslint.config.js:

// @ts-check

import globals from "globals";
import pluginJs from "@eslint/js";
import tsLint from "typescript-eslint";
import pluginReactConfig from "eslint-plugin-react/configs/recommended.js";


export default tsLint.config(
		{
			languageOptions: {
				globals: {...globals.browser, ...globals.node}
			}
		},
		pluginJs.configs.recommended,
		...tsLint.configs.recommended,
		pluginReactConfig,
		{
			plugins: ["react", 'react-refresh'],
			files: ["**/*.tsx", "**/*.ts"],
			rules: {
				'react/require-render-return': 'off',
				'react-refresh/only-export-components': [
					'warn',
					{allowConstantExport: true},
				],
				"@typescript-eslint/ban-ts-comment": "off",
				"@typescript-eslint/no-explicit-any": "off",
				"@typescript-eslint/no-unused-vars": "off",
				"@typescript-eslint/no-var-requires": "off",
				"semi": ["error", "always"], // 强制末尾分号
				"quotes": ["error", "double", {allowTemplateLiterals: true}],
				"@next/next/no-img-element": "off",
				"eqeqeq": "error", // 要求使用 === 和 !==
				"no-empty": "error", // 块语句中的内容不能为空
				"no-empty-character-class": "error", // 正则表达式中的[]内容不能为空
				"no-extra-boolean-cast": "error", // 禁止不必要的bool转换
				"no-extra-parens": "off", // 禁止非必要的括号
				"no-extra-semi": "error", // 禁止多余的冒号
				"no-invalid-this": "error", // 禁止无效的this,只能用在构造器,类,对象字面量
				"no-irregular-whitespace": "error", // 不能有不规则的空格
				"no-self-assign": "error", // 禁止自我赋值
				"no-self-compare": "error", // 禁止自身比较
				"no-sequences": "error", // 禁用逗号操作符
				"key-spacing": ["error", {beforeColon: false, afterColon: true}], // 对象字面量中冒号的前后空格
				"no-unmodified-loop-condition": "error", // 禁用一成不变的循环条件
				"no-unused-expressions": "off", // 禁止出现未使用过的表达式
				"object-curly-spacing": ["error", "always"], // 对象前后需要空格
				"array-bracket-spacing": [
					"error",
					"never",
					{
						objectsInArrays: false,
					},
				], // 是否允许非空数组里面有多余的空格
				"arrow-parens": "off", // 箭头函数用小括号括起来
				"block-spacing": ["error", "always"], // =>的前/后括号
				"callback-return": "off", // 避免多次调用回调
				"react/self-closing-comp": [
					"error",
					{
						component: true,
						html: false,
					},
				],
				"react/react-in-jsx-scope": "off",
				"react/jsx-closing-tag-location": ["error"],
				"react/jsx-first-prop-new-line": ["error", "multiline-multiprop"],
				"react/jsx-closing-bracket-location": ["error"],
				"react/jsx-max-props-per-line": ["error", {maximum: 1, when: "always"}],
				"react/jsx-wrap-multilines": [
					"error",
					{
						declaration: true,
						assignment: true,
						return: true,
						arrow: true,
						condition: true,
					},
				],
				"react/jsx-sort-props": [
					"error",
					{
						multiline: "last",
						callbacksLast: true,
						shorthandFirst: true,
					},
				],
				'react/jsx-no-undef': ['error', {allowGlobals: true}],
				"react-hooks/exhaustive-deps": ["off"],
			}
		}
);

from eslint-plugin-security.

nzakas avatar nzakas commented on August 17, 2024

This has nothing to do with the version of ESLint. Please make sure you have upgraded your eslint-plugin-security to latest.

from eslint-plugin-security.

jmaczan avatar jmaczan commented on August 17, 2024

I get the same error when running eslint src/**/*.{js,jsx,ts,tsx}

Deps:

    "@eslint/js": "^9.2.0",
    "eslint": "^9.2.0",
    "eslint-config-prettier": "^9.1.0",
    "eslint-plugin-prettier": "^5.1.3",
    "eslint-plugin-react": "^7.34.1",

from eslint-plugin-security.

nzakas avatar nzakas commented on August 17, 2024

Okay, it seems like people are a bit confused: this repository is only for eslint-plugin-security. If you're not using eslint-plugin-security, then you need to file an issue with the owner of the plugin you're having trouble with.

from eslint-plugin-security.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.