Skip to content

Commit

Permalink
chore(): Update eslint libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
doug-martin committed Oct 29, 2020
1 parent 8ac4d53 commit 4769d9e
Show file tree
Hide file tree
Showing 42 changed files with 13,567 additions and 275 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**/build
**/node_modules
documentation
22 changes: 19 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
module.exports = {
root: true,
env: {
node: true,
jest: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.build.json',
sourceType: 'module',
project: ['./packages/*/tsconfig.json', './examples/*/tsconfig.json'],
tsconfigRootDir: __dirname,
},
plugins: ['@typescript-eslint', 'prettier', 'import', 'jest', 'eslint-plugin-tsdoc'],
extends: [
Expand All @@ -22,8 +25,6 @@ module.exports = {
rules: {
'prettier/prettier': 'error',
'tsdoc/syntax': 'warn',
// todo remove this when upgrading airbnb-typescript
'@typescript-eslint/camelcase': 'off',
// never allow default export
'import/prefer-default-export': 'off',
// never allow default export
Expand All @@ -39,5 +40,20 @@ module.exports = {
'@typescript-eslint/ban-ts-comment': 'off',
},
},
{
files: ['*.js'],
parser: '',
parserOptions: { project: './tsconfig.build.json' },
rules: {
'no-console': 'off',
'prettier/prettier': 'error',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-var-requires': 'off',
},
},
],
};
13,212 changes: 13,212 additions & 0 deletions documentation/package-lock.json

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions examples/fast-csv-ts/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
module.exports = {
parserOptions: {
project: "./tsconfig.build.json"
},
rules: {
'no-console': 0,
},
};
};
2 changes: 1 addition & 1 deletion examples/fast-csv-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"example": "run-examples --dir=build run",
"build": "npm run clean && npm run compile",
"clean": "rm -rf ./build && rm -rf tsconfig.tsbuildinfo",
"compile": "tsc -p tsconfig.build.json"
"compile": "tsc"
},
"dependencies": {
"example-runner": "4.3.2",
Expand Down
7 changes: 0 additions & 7 deletions examples/fast-csv-ts/tsconfig.build.json

This file was deleted.

7 changes: 5 additions & 2 deletions examples/fast-csv-ts/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.json",
"include": ["./examples"]
"extends": "../../tsconfig.build.json",
"compilerOptions": {
"outDir": "./build",
"rootDir": "./examples"
}
}
5 changes: 1 addition & 4 deletions examples/formatting-ts/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
module.exports = {
parserOptions: {
project: "./tsconfig.build.json"
},
rules: {
'no-console': 0,
},
};
};
2 changes: 1 addition & 1 deletion examples/formatting-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"example": "run-examples --dir=build run",
"build": "npm run clean && npm run compile",
"clean": "rm -rf ./build && rm -rf tsconfig.tsbuildinfo",
"compile": "tsc -p tsconfig.build.json"
"compile": "tsc"
},
"dependencies": {
"@fast-csv/format": "4.3.1",
Expand Down
7 changes: 0 additions & 7 deletions examples/formatting-ts/tsconfig.build.json

This file was deleted.

7 changes: 5 additions & 2 deletions examples/formatting-ts/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.json",
"include": ["./examples"]
"extends": "../../tsconfig.build.json",
"compilerOptions": {
"outDir": "./build",
"rootDir": "./examples"
}
}
18 changes: 18 additions & 0 deletions examples/js.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
root: true,
env: {
node: true,
},
parser: 'esprima',
parserOptions: {
sourceType: 'module',
project: null,
},
plugins: ['prettier', 'import', 'jest'],
extends: ['airbnb-base', 'eslint:recommended', 'prettier'],
ignorePatterns: ['**/build', '**/node_modules', 'documentation', '.eslintrc.js'],
rules: {
'prettier/prettier': 'error',
'no-console': 0,
},
};
3 changes: 0 additions & 3 deletions examples/parsing-ts/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
module.exports = {
parserOptions: {
project: './tsconfig.build.json',
},
rules: {
'no-console': 'off',
},
Expand Down
2 changes: 1 addition & 1 deletion examples/parsing-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"example": "run-examples --dir=build run",
"build": "npm run clean && npm run compile",
"clean": "rm -rf ./build && rm -rf tsconfig.tsbuildinfo",
"compile": "tsc -p tsconfig.build.json"
"compile": "tsc"
},
"dependencies": {
"@fast-csv/parse": "4.3.2",
Expand Down
7 changes: 0 additions & 7 deletions examples/parsing-ts/tsconfig.build.json

This file was deleted.

7 changes: 5 additions & 2 deletions examples/parsing-ts/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"extends": "../../tsconfig.json",
"include": ["./examples"]
"extends": "../../tsconfig.build.json",
"compilerOptions": {
"outDir": "./build",
"rootDir": "./examples"
}
}
19 changes: 0 additions & 19 deletions js.eslintrc.js

This file was deleted.

0 comments on commit 4769d9e

Please sign in to comment.