Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,3 @@ dist

# Website directory
website

# eslint cannot lint itself
.eslintrc.js
86 changes: 49 additions & 37 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,46 +1,58 @@
module.exports = {
extends: [
'eslint:recommended',
'plugin:prettier/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'prettier/@typescript-eslint',
],
extends: ['eslint:recommended', 'plugin:prettier/recommended'],
env: {
browser: true,
amd: true,
es6: true,
node: true,
mocha: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
project: './tsconfig.lint.json',
warnOnUnsupportedTypeScriptVersion: false,
},
plugins: ['@typescript-eslint'],
rules: {
'arrow-body-style': ['error'],
'no-template-curly-in-string': 'error',
'no-useless-concat': 'error',
'no-useless-escape': 'off',
'no-var': 'error',
'one-var': ['error', 'never'],
'prefer-arrow-callback': ['error', { allowNamedFunctions: true }],
'prefer-const': 'error',
'prefer-template': 'error',
quotes: ['error', 'single', { avoidEscape: true }],
'template-curly-spacing': 'error',
'template-tag-spacing': 'error',
overrides: [
{
files: ['**/*.ts'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:prettier/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
project: './tsconfig.lint.json',
warnOnUnsupportedTypeScriptVersion: false,
},
plugins: ['@typescript-eslint'],
rules: {
'arrow-body-style': ['error'],
'no-template-curly-in-string': 'error',
'no-useless-concat': 'error',
'no-useless-escape': 'off',
'no-var': 'error',
'one-var': ['error', 'never'],
'prefer-arrow-callback': ['error', { allowNamedFunctions: true }],
'prefer-const': 'error',
'prefer-template': 'error',
'template-curly-spacing': 'error',
'template-tag-spacing': 'error',
quotes: ['error', 'single', { avoidEscape: true }],

'@typescript-eslint/adjacent-overload-signatures': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
},
'@typescript-eslint/adjacent-overload-signatures': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
},
},
{
files: ['**/*.spec.js'],
env: {
mocha: true,
},
},
],
}
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ npm-debug.log*
.github/PULL_REQUEST_TEMPLATE.md

/website/playground
/website/build
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this was a little unrelated, but got caught running the lint locally after I had tried to build the site separately

/website/.docusaurus
/website/plugins
/website/static
Expand Down
2 changes: 1 addition & 1 deletion parser-preset.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
parserOpts: {
headerPattern: /^(\w*)\((\w*)\)\:\s(.*)$/,
headerPattern: /^(\w*)\((\w*)\):\s(.*)$/,
headerCorrespondence: ['type', 'scope', 'subject'],
},
}
1 change: 0 additions & 1 deletion test/cli/formatters/junit.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const expect = require('expect.js')

const ChildProcess = require('child_process')
const fs = require('fs')
const path = require('path')

describe('CLI', () => {
Expand Down