Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@yarnpkg/eslint-config

Package Overview
Dependencies
Maintainers
5
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yarnpkg/eslint-config - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

45

index.js

@@ -1,22 +0,35 @@

// Workaround for https://github.com/eslint/eslint/issues/3458
require(`@rushstack/eslint-patch/modern-module-resolution`);
import tsParser from '@typescript-eslint/parser';
import globals from 'globals';
module.exports = {
extends: [
`./rules/best-practices`,
`./rules/errors`,
`./rules/style`,
`./rules/typescript`,
].map(require.resolve),
import bestPractices from './rules/best-practices.js';
import errors from './rules/errors.js';
import style from './rules/style.js';
import typescript from './rules/typescript.js';
parser: require.resolve(`@typescript-eslint/parser`),
// eslint-disable-next-line arca/no-default-export
export default [
...bestPractices,
...errors,
...style,
...typescript,
env: {
node: true,
es2021: true,
{
languageOptions: {
parser: tsParser,
sourceType: `module`,
globals: {
...globals.node,
...globals.es2021,
},
},
},
parserOptions: {
sourceType: `module`,
{
files: [`**/*.test.*`],
languageOptions: {
globals: {
...globals.jest,
},
},
},
};
];
{
"name": "@yarnpkg/eslint-config",
"version": "1.0.0",
"version": "2.0.0",
"license": "BSD-2-Clause",
"type": "module",
"exports": {

@@ -10,7 +11,7 @@ ".": "./index.js",

"dependencies": {
"@rushstack/eslint-patch": "^1.3.2",
"@typescript-eslint/eslint-plugin": "^6.2.0",
"@typescript-eslint/parser": "^6.2.0",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"eslint-plugin-arca": "^0.16.0",
"eslint-plugin-react": "^7.33.0"
"eslint-plugin-react": "^7.34.1",
"globals": "^15.1.0"
},

@@ -35,4 +36,4 @@ "peerDependencies": {

"devDependencies": {
"eslint": "^8.45.0"
"eslint": "^8.57.0"
}
}

@@ -1,5 +0,6 @@

module.exports = {
extends: [
`./rules/react`,
].map(require.resolve),
};
import react from './rules/react.js';
// eslint-disable-next-line arca/no-default-export
export default [
...react,
];

@@ -1,91 +0,97 @@

module.exports = {
plugins: [
`@typescript-eslint`,
`arca`,
],
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import arcaEslint from 'eslint-plugin-arca';
rules: {
'@typescript-eslint/adjacent-overload-signatures': 2,
// eslint-disable-next-line arca/no-default-export
export default [
{
plugins: {
[`arca`]: arcaEslint,
[`@typescript-eslint`]: typescriptEslint,
},
'@typescript-eslint/no-unused-vars': [1, {
args: `none`,
argsIgnorePattern: `^_`,
ignoreRestSiblings: true,
}],
rules: {
'@typescript-eslint/adjacent-overload-signatures': 2,
'@typescript-eslint/prefer-ts-expect-error': 2,
'@typescript-eslint/no-unused-vars': [1, {
args: `none`,
argsIgnorePattern: `^_`,
ignoreRestSiblings: true,
}],
'arca/no-default-export': 2,
'@typescript-eslint/prefer-ts-expect-error': 2,
'consistent-return': 2,
'arca/no-default-export': 2,
'dot-notation': 2,
'consistent-return': 2,
'no-async-promise-executor': 2,
'dot-notation': 2,
'no-case-declarations': 2,
'no-async-promise-executor': 2,
'no-compare-neg-zero': 2,
'no-case-declarations': 2,
'no-cond-assign': 2,
'no-compare-neg-zero': 2,
'no-constant-condition': [`error`, {
checkLoops: false,
}],
'no-cond-assign': 2,
'no-control-regex': 2,
'no-constant-condition': [`error`, {
checkLoops: false,
}],
'no-debugger': 2,
'no-control-regex': 2,
'no-empty': [`error`, {
allowEmptyCatch: true,
}],
'no-debugger': 2,
'no-empty-character-class': 2,
'no-empty': [`error`, {
allowEmptyCatch: true,
}],
'no-empty-pattern': 2,
'no-empty-character-class': 2,
'no-fallthrough': 2,
'no-empty-pattern': 2,
'no-global-assign': 2,
'no-fallthrough': 2,
'no-import-assign': 2,
'no-global-assign': 2,
'no-inner-declarations': 2,
'no-import-assign': 2,
'no-octal': 2,
'no-inner-declarations': 2,
'no-prototype-builtins': 2,
'no-octal': 2,
'no-regex-spaces': 2,
'no-prototype-builtins': 2,
'no-sparse-arrays': 2,
'no-regex-spaces': 2,
'no-unneeded-ternary': 2,
'no-sparse-arrays': 2,
'no-unused-labels': 2,
'no-unneeded-ternary': 2,
'no-useless-catch': 2,
'no-unused-labels': 2,
'no-useless-escape': 2,
'no-useless-catch': 2,
'no-with': 2,
'no-useless-escape': 2,
'object-shorthand': 2,
'no-with': 2,
'prefer-arrow-callback': 2,
'object-shorthand': 2,
'prefer-const': [`error`, {
destructuring: `all`,
ignoreReadBeforeAssign: true,
}],
'prefer-arrow-callback': 2,
'prefer-object-has-own': 2,
'prefer-const': [`error`, {
destructuring: `all`,
ignoreReadBeforeAssign: true,
}],
'prefer-template': 2,
'prefer-object-has-own': 2,
'require-yield': 2,
'prefer-template': 2,
'use-isnan': 2,
'require-yield': 2,
'use-isnan': 2,
},
},
};
];

@@ -1,78 +0,82 @@

module.exports = {
plugins: [
`@typescript-eslint`,
],
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import arcaEslint from 'eslint-plugin-arca';
rules: {
'@typescript-eslint/no-extra-non-null-assertion': 2,
// eslint-disable-next-line arca/no-default-export
export default [
{
plugins: {
[`arca`]: arcaEslint,
[`@typescript-eslint`]: typescriptEslint,
},
'@typescript-eslint/no-non-null-asserted-optional-chain': 2,
rules: {
'@typescript-eslint/no-extra-non-null-assertion': 2,
'constructor-super': 2,
'@typescript-eslint/no-non-null-asserted-optional-chain': 2,
'for-direction': 2,
'constructor-super': 2,
'getter-return': 2,
'for-direction': 2,
'no-class-assign': 2,
'getter-return': 2,
'no-const-assign': 2,
'no-class-assign': 2,
'no-delete-var': 2,
'no-const-assign': 2,
'no-dupe-args': 2,
'no-delete-var': 2,
'no-dupe-class-members': 2,
'no-dupe-args': 2,
'no-dupe-else-if': 2,
'no-dupe-class-members': 2,
'no-dupe-keys': 2,
'no-dupe-else-if': 2,
'no-duplicate-case': 2,
'no-dupe-keys': 2,
'no-ex-assign': 2,
'no-duplicate-case': 2,
'no-extra-boolean-cast': 2,
'no-ex-assign': 2,
'no-func-assign': 2,
'no-extra-boolean-cast': 2,
'no-invalid-regexp': 2,
'no-func-assign': 2,
'no-obj-calls': 2,
'no-invalid-regexp': 2,
'no-misleading-character-class': 2,
'no-obj-calls': 2,
'no-new-symbol': 2,
'no-misleading-character-class': 2,
'no-redeclare': 2,
'no-new-symbol': 2,
'no-self-assign': 2,
'no-redeclare': 2,
'no-setter-return': 2,
'no-self-assign': 2,
'no-shadow-restricted-names': 2,
'no-setter-return': 2,
'no-this-before-super': 2,
'no-shadow-restricted-names': 2,
'no-unreachable': 2,
'no-this-before-super': 2,
'no-unexpected-multiline': 2,
'no-unreachable': 2,
'no-undef': 2,
'no-unexpected-multiline': 2,
'no-unsafe-finally': 2,
'no-undef': 2,
'no-unsafe-negation': 2,
'no-unsafe-finally': 2,
'valid-typeof': 2,
},
'no-unsafe-negation': 2,
overrides: [
{
files: [`*.test.{js,ts}`],
env: {
jest: true,
},
'valid-typeof': 2,
},
],
};
},
{
files: [`*.test.{js,ts}`],
env: {
jest: true,
},
},
];

@@ -1,10 +0,18 @@

module.exports = {
plugins: [
`react`,
],
rules: {
'arca/jsx-longhand-props': 2,
'react/jsx-uses-react': 1,
'react/jsx-uses-vars': 1,
import arcaEslint from 'eslint-plugin-arca';
import reactEslint from 'eslint-plugin-react';
// eslint-disable-next-line arca/no-default-export
export default [
{
plugins: {
[`arca`]: arcaEslint,
[`react`]: reactEslint,
},
rules: {
'arca/jsx-longhand-props': 2,
'react/jsx-uses-react': 1,
'react/jsx-uses-vars': 1,
},
},
};
];

@@ -1,128 +0,134 @@

module.exports = {
plugins: [
`@typescript-eslint`,
`arca`,
],
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import arcaEslint from 'eslint-plugin-arca';
rules: {
'@typescript-eslint/array-type': [`error`, {
default: `generic`,
}],
// eslint-disable-next-line arca/no-default-export
export default [
{
plugins: {
[`arca`]: arcaEslint,
[`@typescript-eslint`]: typescriptEslint,
},
'@typescript-eslint/brace-style': 2,
rules: {
'@typescript-eslint/array-type': [`error`, {
default: `generic`,
}],
'@typescript-eslint/comma-dangle': [`error`, `always-multiline`],
'@typescript-eslint/brace-style': 2,
'@typescript-eslint/keyword-spacing': 2,
'@typescript-eslint/comma-dangle': [`error`, `always-multiline`],
'@typescript-eslint/comma-spacing': 2,
'@typescript-eslint/keyword-spacing': 2,
'@typescript-eslint/naming-convention': [`error`, {
selector: `default`,
format: [`camelCase`, `UPPER_CASE`, `PascalCase`],
filter: {
regex: `^(__.*|__non_webpack_require__|npm(_[a-z]+)+)$`,
match: false,
},
leadingUnderscore: `allow`,
}],
'@typescript-eslint/comma-spacing': 2,
'@typescript-eslint/func-call-spacing': 2,
'@typescript-eslint/naming-convention': [`error`, {
selector: `default`,
format: [`camelCase`, `UPPER_CASE`, `PascalCase`],
filter: {
regex: `^(__.*|__non_webpack_require__|npm(_[a-z]+)+)$`,
match: false,
},
leadingUnderscore: `allow`,
}],
'@typescript-eslint/indent': [`error`, 2, {
SwitchCase: 1,
ignoredNodes: [`TSTypeParameterInstantiation`],
}],
'@typescript-eslint/func-call-spacing': 2,
'@typescript-eslint/member-delimiter-style': [`error`, {
multiline: {
delimiter: `semi`,
requireLast: true,
},
singleline: {
requireLast: false,
},
overrides: {
interface: {
singleline: {
delimiter: `semi`,
},
'@typescript-eslint/indent': [`error`, 2, {
SwitchCase: 1,
ignoredNodes: [`TSTypeParameterInstantiation`],
}],
'@typescript-eslint/member-delimiter-style': [`error`, {
multiline: {
delimiter: `semi`,
requireLast: true,
},
typeLiteral: {
singleline: {
delimiter: `comma`,
singleline: {
requireLast: false,
},
overrides: {
interface: {
singleline: {
delimiter: `semi`,
},
},
typeLiteral: {
singleline: {
delimiter: `comma`,
},
},
},
},
}],
}],
'@typescript-eslint/quotes': [`error`, `backtick`],
'@typescript-eslint/quotes': [`error`, `backtick`],
'@typescript-eslint/semi': 2,
'@typescript-eslint/semi': 2,
'@typescript-eslint/space-infix-ops': 2,
'@typescript-eslint/space-infix-ops': 2,
'@typescript-eslint/type-annotation-spacing': 2,
'@typescript-eslint/type-annotation-spacing': 2,
'arca/import-quotes': 2,
'arca/import-quotes': 2,
'arca/curly': 2,
'arca/curly': 2,
'arca/import-align': [2, {
collapseExtraSpaces: true,
}],
'arca/import-align': [2, {
collapseExtraSpaces: true,
}],
'arca/import-ordering': [2, {
hoistOneliners: true,
}],
'arca/import-ordering': [2, {
hoistOneliners: true,
}],
'arca/newline-after-import-section': [2, {
enableOnelinerSections: true,
}],
'arca/newline-after-import-section': [2, {
enableOnelinerSections: true,
}],
'array-bracket-spacing': 2,
'array-bracket-spacing': 2,
'arrow-parens': [`error`, `as-needed`],
'arrow-parens': [`error`, `as-needed`],
'arrow-spacing': 2,
'arrow-spacing': 2,
'computed-property-spacing': 2,
'computed-property-spacing': 2,
'eol-last': [`error`, `always`],
'eol-last': [`error`, `always`],
'generator-star-spacing': [`error`, {
before: true,
after: true,
}],
'generator-star-spacing': [`error`, {
before: true,
after: true,
}],
'jsx-quotes': 2,
'jsx-quotes': 2,
'key-spacing': 2,
'key-spacing': 2,
'no-extra-semi': 2,
'no-extra-semi': 2,
'no-irregular-whitespace': 2,
'no-irregular-whitespace': 2,
'no-mixed-spaces-and-tabs': 2,
'no-mixed-spaces-and-tabs': 2,
'no-multiple-empty-lines': [`error`, {max: 2, maxBOF: 0, maxEOF: 0}],
'no-multiple-empty-lines': [`error`, {max: 2, maxBOF: 0, maxEOF: 0}],
'no-tabs': 2,
'no-tabs': 2,
'no-trailing-spaces': 2,
'no-trailing-spaces': 2,
'object-curly-spacing': 2,
'object-curly-spacing': 2,
'padded-blocks': [`error`, `never`],
'padded-blocks': [`error`, `never`],
'quote-props': [`error`, `as-needed`],
'quote-props': [`error`, `as-needed`],
'rest-spread-spacing': 2,
'rest-spread-spacing': 2,
'space-before-blocks': 2,
'space-before-blocks': 2,
'space-in-parens': 2,
'space-in-parens': 2,
'template-curly-spacing': 2,
'template-curly-spacing': 2,
},
},
};
];

@@ -1,44 +0,50 @@

module.exports = {
overrides: [
{
files: [`*.ts`, `*.tsx`],
rules: {
// Checked by Typescript - ts(2378)
'getter-return': 0,
import typescriptEslint from '@typescript-eslint/eslint-plugin';
// Checked by Typescript - ts(2300)
'no-dupe-args': 0,
// eslint-disable-next-line arca/no-default-export
export default [
{
files: [`**/*.{ts,tsx}`],
// Checked by Typescript - ts(1117)
'no-dupe-keys': 0,
plugins: {
[`@typescript-eslint`]: typescriptEslint,
},
// Checked by Typescript - ts(7027)
'no-unreachable': 0,
rules: {
// Checked by Typescript - ts(2378)
'getter-return': 0,
// Checked by Typescript - ts(2367)
'valid-typeof': 0,
// Checked by Typescript - ts(2300)
'no-dupe-args': 0,
// Checked by Typescript - ts(2588)
'no-const-assign': 0,
// Checked by Typescript - ts(1117)
'no-dupe-keys': 0,
// Checked by Typescript - ts(2588)
'no-new-symbol': 0,
// Checked by Typescript - ts(7027)
'no-unreachable': 0,
// Checked by Typescript - ts(2376)
'no-this-before-super': 0,
// Checked by Typescript - ts(2367)
'valid-typeof': 0,
// This is checked by Typescript using the option `strictNullChecks`.
'no-undef': 0,
// Checked by Typescript - ts(2588)
'no-const-assign': 0,
// Replaced by `@typescript-eslint/no-unused-vars`
'no-unused-vars': 0,
// Checked by Typescript - ts(2588)
'no-new-symbol': 0,
// This is already checked by Typescript.
'no-dupe-class-members': `off`,
// Checked by Typescript - ts(2376)
'no-this-before-super': 0,
// This is already checked by Typescript.
'no-redeclare': `off`,
},
// This is checked by Typescript using the option `strictNullChecks`.
'no-undef': 0,
// Replaced by `@typescript-eslint/no-unused-vars`
'no-unused-vars': 0,
// This is already checked by Typescript.
'no-dupe-class-members': `off`,
// This is already checked by Typescript.
'no-redeclare': `off`,
},
],
};
},
];
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc