New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eslint-config-ecmascript

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-ecmascript - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

280

index.js

@@ -12,164 +12,130 @@ module.exports = {

},
plugins: ['import'],
rules: {
// disable unnecessary recommended rules
'no-console': 0,
'no-constant-condition': 0,
// best practices
'accessor-pairs': 2,
'array-callback-return': 2,
'consistent-return': 2,
'dot-location': [2, 'property'],
'eqeqeq': [2, 'smart'],
'no-caller': 2,
'no-global-assign': 2,
'no-extend-native': 2,
'no-extra-bind': 2,
'no-extra-label': 2,
'no-invalid-this': 2,
'no-iterator': 2,
'no-labels': 2,
'no-lone-blocks': 2,
'no-loop-func': 2,
'no-new': 2,
'no-new-wrappers': 2,
'no-proto': 2,
'no-return-assign': 2,
'no-return-await': 2,
'no-self-compare': 2,
'no-sequences': 2,
'no-throw-literal': 2,
'no-void': 2,
'no-unused-expressions': 2,
'no-unsafe-negation': 2,
'no-useless-call': 2,
'no-useless-concat': 2,
'no-useless-return': 2,
'no-with': 2,
'prefer-promise-reject-errors': [2, { allowEmptyReject: true }],
'yoda': 2,
'require-atomic-updates': 2,
'comma-dangle': [2, {
'accessor-pairs': 'error',
'array-bracket-spacing': 'error',
'array-callback-return': 'error',
'arrow-parens': ['error', 'always'],
'arrow-spacing': 'error',
'block-spacing': 'error',
'brace-style': ['error', '1tbs', { 'allowSingleLine': true }],
'camelcase': 'error',
'comma-dangle': ['error', {
'arrays': 'always-multiline',
'objects': 'always-multiline',
'imports': 'always-multiline',
'exports': 'always-multiline',
'functions': 'only-multiline',
'imports': 'always-multiline',
'objects': 'always-multiline',
}],
// ES
'no-var': 2,
'prefer-const': 2,
'arrow-parens': [2, 'always'],
'arrow-spacing': 2,
'generator-star-spacing': 2,
'no-confusing-arrow': 2,
'no-duplicate-imports': 2,
'no-useless-computed-key': 2,
'no-useless-constructor': 2,
'no-useless-rename': 2,
'object-shorthand': 2,
'prefer-numeric-literals': 2,
'prefer-rest-params': 2,
'prefer-spread': 2,
'prefer-template': 2,
'rest-spread-spacing': 2,
'yield-star-spacing': 2,
'template-tag-spacing': 2,
// variables
'no-shadow-restricted-names': 2,
'no-undef-init': 2,
'no-use-before-define': [2, 'nofunc'],
// node-related
'global-require': 2,
'handle-callback-err': 2,
'no-buffer-constructor': 2,
'no-mixed-requires': 2,
'no-new-require': 2,
'no-path-concat': 2,
'no-process-exit': 2,
// stylistic issues
'curly': [2, 'multi-line', 'consistent'],
'indent': [2, 2, { flatTernaryExpressions: true, SwitchCase: 1 }],
'linebreak-style': [2, 'unix'],
'quotes': [2, 'single', { avoidEscape: true }],
'semi': [2, 'always'],
'array-bracket-spacing': 2,
'block-spacing': 2,
'brace-style': [2, '1tbs', { allowSingleLine: true }],
'camelcase': 2,
'comma-spacing': 2,
'comma-style': 2,
'eol-last': 2,
'func-call-spacing': 2,
'func-name-matching': 2,
'implicit-arrow-linebreak': 2,
'key-spacing': 2,
'keyword-spacing': 2,
'new-parens': 2,
'newline-before-return': 2,
'no-array-constructor': 2,
'no-empty': 2,
'no-lonely-if': 2,
'no-new-object': 2,
'no-mixed-spaces-and-tabs': 2,
'no-multiple-empty-lines': [2, { max: 2 }],
'no-trailing-spaces': 2,
'no-unneeded-ternary': 2,
'object-curly-spacing': [2, 'always'],
'operator-linebreak': [2, 'before'],
'semi-spacing': 2,
'space-before-blocks': 2,
'space-before-function-paren': [2, { anonymous: 'always', named: 'never' }],
'space-in-parens': 2,
'space-infix-ops': 2,
'space-unary-ops': 2,
'switch-colon-spacing': 2,
'max-len': [
1,
{
'code': 120,
'ignoreComments': true,
'ignoreUrls': true,
'ignoreStrings': true,
'ignoreTemplateLiterals': true,
'ignoreRegExpLiterals': true
}
],
// import
'import/named': 2,
'import/export': 2,
'import/no-named-as-default': 2,
'import/no-named-as-default-member': 2,
'import/no-mutable-exports': 2,
'import/first': 2,
'import/no-duplicates': 2,
'import/order': [2, {
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
pathGroups: [
{
pattern: '*.+(png|svg)',
group: 'sibling',
patternOptions: { matchBase: true },
position: 'after',
},
{
pattern: '*.+(scss|sass|css)',
group: 'sibling',
patternOptions: { matchBase: true },
position: 'after',
},
],
'comma-spacing': 'error',
'comma-style': 'error',
'consistent-return': 'error',
'curly': ['error', 'multi-line', 'consistent'],
'dot-location': ['error', 'property'],
'eol-last': 'error',
'eqeqeq': ['error', 'smart'],
'func-call-spacing': 'error',
'func-name-matching': 'error',
'generator-star-spacing': 'error',
'global-require': 'error',
'handle-callback-err': 'error',
'implicit-arrow-linebreak': 'error',
'indent': ['error', 2, {
'flatTernaryExpressions': true,
'SwitchCase': 1,
}],
'import/newline-after-import': 2,
'import/no-absolute-path': 2,
'import/no-dynamic-require': 2,
'import/no-named-default': 2,
'import/no-self-import': 1,
}
};
'key-spacing': 'error',
'keyword-spacing': 'error',
'linebreak-style': ['error', 'unix'],
'max-len': ['warn', {
'code': 120,
'ignoreComments': true,
'ignoreRegExpLiterals': true,
'ignoreStrings': true,
'ignoreTemplateLiterals': true,
'ignoreUrls': true,
}],
'new-parens': 'error',
'newline-before-return': 'error',
'no-array-constructor': 'error',
'no-buffer-constructor': 'error',
'no-caller': 'error',
'no-confusing-arrow': 'error',
'no-console': 'off',
'no-constant-condition': 'off',
'no-duplicate-imports': 'error',
'no-empty': 'error',
'no-extend-native': 'error',
'no-extra-bind': 'error',
'no-extra-label': 'error',
'no-global-assign': 'error',
'no-invalid-this': 'error',
'no-iterator': 'error',
'no-labels': 'error',
'no-lone-blocks': 'error',
'no-lonely-if': 'error',
'no-loop-func': 'error',
'no-mixed-requires': 'error',
'no-mixed-spaces-and-tabs': 'error',
'no-multiple-empty-lines': ['error', {
'max': 2,
}],
'no-new': 'error',
'no-new-object': 'error',
'no-new-require': 'error',
'no-new-wrappers': 'error',
'no-path-concat': 'error',
'no-process-exit': 'error',
'no-proto': 'error',
'no-return-assign': 'error',
'no-return-await': 'error',
'no-self-compare': 'error',
'no-sequences': 'error',
'no-shadow-restricted-names': 'error',
'no-throw-literal': 'error',
'no-trailing-spaces': 'error',
'no-undef-init': 'error',
'no-unneeded-ternary': 'error',
'no-unsafe-negation': 'error',
'no-unused-expressions': 'error',
'no-use-before-define': ['error', 'nofunc'],
'no-useless-call': 'error',
'no-useless-computed-key': 'error',
'no-useless-concat': 'error',
'no-useless-constructor': 'error',
'no-useless-rename': 'error',
'no-useless-return': 'error',
'no-var': 'error',
'no-void': 'error',
'no-with': 'error',
'object-curly-spacing': ['error', 'always'],
'object-shorthand': 'error',
'operator-linebreak': ['error', 'before'],
'prefer-const': 'error',
'prefer-numeric-literals': 'error',
'prefer-promise-reject-errors': ['error', {
'allowEmptyReject': true,
}],
'prefer-rest-params': 'error',
'prefer-spread': 'error',
'prefer-template': 'error',
'quotes': ['error', 'single', {
'avoidEscape': true,
}],
'require-atomic-updates': 'error',
'rest-spread-spacing': 'error',
'semi': ['error', 'always'],
'semi-spacing': 'error',
'space-before-blocks': 'error',
'space-before-function-paren': ['error', {
'anonymous': 'always',
'named': 'never',
}],
'space-in-parens': 'error',
'space-infix-ops': 'error',
'space-unary-ops': 'error',
'switch-colon-spacing': 'error',
'template-tag-spacing': 'error',
'yield-star-spacing': 'error',
'yoda': 'error',
},
};
{
"name": "eslint-config-ecmascript",
"version": "1.0.0",
"version": "1.1.0",
"main": "index.js",
"scripts": {},
"dependencies": {
"eslint-plugin-import": "2.26.0"
},
"devDependencies": {
"eslint": "8.15.0"
"eslint": "8.21.0"
},

@@ -24,5 +21,6 @@ "peerDependencies": {

"keywords": [
"eslint"
"eslint",
"javascript"
],
"license": "MIT"
}
# eslint-config-for
## Install
To use it in your project, run:
```
npm i eslint-config-for-javascript
npm install --save-dev eslint-config-for-ecmascript
```
```
npm i eslint-config-for-typescript
```
Then add a following `.eslintrc` file in the repo root:
```json
{
"extends": ["eslint-config-for-ecmascript"]
}
```
npm i eslint-config-for-react
```
## Usage
Extend necessary configs inside `.eslintrc.json`
```
{
"extends": [
"eslint-config-for-javascript", // required
"eslint-config-for-typescript", // optional
"eslint-config-for-react" // optional
]
}
```
- [npm package](https://www.npmjs.com/package/eslint-config-ecmascript)
- [eslint rules documentation](https://eslint.org/docs/latest/rules/)
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