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

@silvermine/eslint-config

Package Overview
Dependencies
Maintainers
3
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@silvermine/eslint-config - npm Package Compare versions

Comparing version 1.5.0 to 2.0.0-preview.1

73

index.js

@@ -17,5 +17,17 @@ /**

'plugins': [
'@silvermine/eslint-plugin-silvermine',
'@silvermine/eslint-plugin-silvermine', // Our custom rules
'typescript', // TypeScript-specific rules
],
'parserOptions': {
// Setting the ecmaVersion to 2018 allows ESLint to parse any file that has valid
// syntax, even if we use things like spread and rest syntax. It would be nice to
// set this to something like 'latest', but you must specify a specific version.
'ecmaVersion': 2018,
},
'env': {
'es6': true,
},
'rules': {

@@ -176,11 +188,5 @@

'error',
'ArrowFunctionExpression',
'ClassBody',
'ClassDeclaration',
'ClassExpression',
'DoWhileStatement',
'DebuggerStatement',
'EmptyStatement',
'ExperimentalRestProperty',
'ExperimentalSpreadProperty',
'ForInStatement',

@@ -206,3 +212,3 @@ 'JSXIdentifier',

'object-curly-spacing': [ 'error', 'always' ],
'one-var': [ 'error', 'always' ],
'one-var': [ 'error', { 'var': 'always', 'let': 'consecutive' } ],
'one-var-declaration-per-line': 'error',

@@ -220,3 +226,54 @@ 'quote-props': [ 'error', 'as-needed', { 'keywords': true, 'unnecessary': false } ],

'arrow-spacing': [ 'error', { 'before': true, 'after': true } ],
},
'overrides': [
{
'files': [ '*.ts' ],
'parser': 'typescript-eslint-parser',
'parserOptions': {
'sourceType': 'module',
// Disable warning banner for possibly incompatible versions of TypeScript
'loggerFn': false,
},
'rules': {
// TODO: figure out how to fix no-undef.
// Currently, no-undef causes false positives for TypeScript class properties.
// With TypeScript-only code this rule can safely be disabled because
// TypeScript won't compile if the definition is missing. However, if we use
// any JavaScript in the project we need to have it enabled.
'no-undef': 'off',
// The standard ESLint `no-unused-vars' rule will throw false positives with
// class properties in TypeScript. The TypeScript-specific rule fixes this.
'typescript/no-unused-vars': 'error',
'no-unused-vars': 'off',
// new-cap throws errors with property decorators
'new-cap': 'off',
'typescript/adjacent-overload-signatures': 'error',
'typescript/class-name-casing': 'error',
'typescript/explicit-function-return-type': 'error',
'typescript/explicit-member-accessibility': 'error',
'typescript/member-delimiter-style': 'error',
'typescript/no-angle-bracket-type-assertion': 'error',
'typescript/no-array-constructor': 'error',
'typescript/no-namespace': 'error',
'typescript/member-naming': [ 'error', { 'private': '^_', 'protected': '^_' } ],
'typescript/member-ordering': 'error',
'typescript/no-non-null-assertion': 'error',
'typescript/no-parameter-properties': [ 'error', { 'allows': [ 'private' ] } ],
'typescript/no-triple-slash-reference': 'error',
'typescript/type-annotation-spacing': [
'error',
{
'before': false,
'after': true,
'overrides': {
'arrow': { 'before': true, 'after': true },
},
},
],
},
},
],
};

7

package.json
{
"name": "@silvermine/eslint-config",
"version": "1.5.0",
"version": "2.0.0-preview.1",
"description": "JS Code Standards for all SilverMine projects - eslint enforcement",

@@ -24,3 +24,6 @@ "main": "index.js",

"dependencies": {
"@silvermine/eslint-plugin-silvermine": "1.2.1"
"@silvermine/eslint-plugin-silvermine": "1.2.1",
"eslint-plugin-typescript": "0.13.0",
"typescript": "3.0.3",
"typescript-eslint-parser": "21.0.1"
},

@@ -27,0 +30,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

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