@silvermine/eslint-config
Advanced tools
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 }, | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
}; |
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13902
308
4
2
1
+ Addedtypescript@3.0.3
+ Added@eslint-community/eslint-utils@4.4.1(transitive)
+ Added@eslint-community/regexpp@4.12.1(transitive)
+ Added@eslint/config-array@0.19.1(transitive)
+ Added@eslint/core@0.9.1(transitive)
+ Added@eslint/eslintrc@3.2.0(transitive)
+ Added@eslint/js@9.17.0(transitive)
+ Added@eslint/object-schema@2.1.5(transitive)
+ Added@eslint/plugin-kit@0.2.4(transitive)
+ Added@humanfs/core@0.19.1(transitive)
+ Added@humanfs/node@0.16.6(transitive)
+ Added@humanwhocodes/module-importer@1.0.1(transitive)
+ Added@humanwhocodes/retry@0.3.10.4.1(transitive)
+ Added@types/estree@1.0.6(transitive)
+ Added@types/json-schema@7.0.15(transitive)
+ Addedacorn@8.14.0(transitive)
+ Addedacorn-jsx@5.3.2(transitive)
+ Addedajv@6.12.6(transitive)
+ Addedansi-styles@4.3.0(transitive)
+ Addedargparse@2.0.1(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedcallsites@3.1.0(transitive)
+ Addedchalk@4.1.2(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedcross-spawn@7.0.6(transitive)
+ Addeddebug@4.4.0(transitive)
+ Addeddeep-is@0.1.4(transitive)
+ Addedescape-string-regexp@4.0.0(transitive)
+ Addedeslint@9.17.0(transitive)
+ Addedeslint-plugin-typescript@0.13.0(transitive)
+ Addedeslint-scope@4.0.38.2.0(transitive)
+ Addedeslint-visitor-keys@1.3.03.4.34.2.0(transitive)
+ Addedespree@10.3.0(transitive)
+ Addedesquery@1.6.0(transitive)
+ Addedesrecurse@4.3.0(transitive)
+ Addedestraverse@4.3.05.3.0(transitive)
+ Addedesutils@2.0.3(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addedfast-levenshtein@2.0.6(transitive)
+ Addedfile-entry-cache@8.0.0(transitive)
+ Addedfind-up@5.0.0(transitive)
+ Addedflat-cache@4.0.1(transitive)
+ Addedflatted@3.3.2(transitive)
+ Addedglob-parent@6.0.2(transitive)
+ Addedglobals@14.0.0(transitive)
+ Addedhas-flag@4.0.0(transitive)
+ Addedignore@5.3.2(transitive)
+ Addedimport-fresh@3.3.0(transitive)
+ Addedimurmurhash@0.1.4(transitive)
+ Addedis-extglob@2.1.1(transitive)
+ Addedis-glob@4.0.3(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedjs-yaml@4.1.0(transitive)
+ Addedjson-buffer@3.0.1(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedjson-stable-stringify-without-jsonify@1.0.1(transitive)
+ Addedkeyv@4.5.4(transitive)
+ Addedlevn@0.4.1(transitive)
+ Addedlocate-path@6.0.0(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedlodash.merge@4.6.2(transitive)
+ Addedlodash.unescape@4.0.1(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedms@2.1.3(transitive)
+ Addednatural-compare@1.4.0(transitive)
+ Addedoptionator@0.9.4(transitive)
+ Addedp-limit@3.1.0(transitive)
+ Addedp-locate@5.0.0(transitive)
+ Addedparent-module@1.0.1(transitive)
+ Addedpath-exists@4.0.0(transitive)
+ Addedpath-key@3.1.1(transitive)
+ Addedprelude-ls@1.2.1(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedrequireindex@1.1.0(transitive)
+ Addedresolve-from@4.0.0(transitive)
+ Addedsemver@5.5.0(transitive)
+ Addedshebang-command@2.0.0(transitive)
+ Addedshebang-regex@3.0.0(transitive)
+ Addedstrip-json-comments@3.1.1(transitive)
+ Addedsupports-color@7.2.0(transitive)
+ Addedtype-check@0.4.0(transitive)
+ Addedtypescript@3.0.3(transitive)
+ Addedtypescript-eslint-parser@21.0.1(transitive)
+ Addedtypescript-estree@5.0.0(transitive)
+ Addeduri-js@4.4.1(transitive)
+ Addedwhich@2.0.2(transitive)
+ Addedword-wrap@1.2.5(transitive)
+ Addedyocto-queue@0.1.0(transitive)