-
-
Notifications
You must be signed in to change notification settings - Fork 592
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(repo): update linting, prettier configuration
- Loading branch information
1 parent
9e31d93
commit e32a9e9
Showing
20 changed files
with
721 additions
and
257 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,28 @@ | ||
module.exports = { | ||
extends: ['rollup', 'plugin:import/typescript'], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: ['./tsconfig.eslint.json', './packages/*/tsconfig.json'], | ||
tsconfigRootDir: __dirname | ||
}, | ||
plugins: ['@typescript-eslint'], | ||
rules: { | ||
'@typescript-eslint/consistent-type-assertions': 'error', | ||
'@typescript-eslint/consistent-type-definitions': 'error', | ||
'@typescript-eslint/member-ordering': 'error', | ||
'@typescript-eslint/no-inferrable-types': 'error', | ||
'@typescript-eslint/no-redeclare': 'error', | ||
'@typescript-eslint/no-unnecessary-type-assertion': 'error', | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ | ||
vars: 'local', | ||
args: 'after-used', | ||
ignoreRestSiblings: true | ||
} | ||
], | ||
'import/extensions': [ | ||
'error', | ||
'always', | ||
{ | ||
js: 'never', | ||
jsx: 'never', | ||
ts: 'never', | ||
tsx: 'never' | ||
} | ||
], | ||
'import/no-extraneous-dependencies': [ | ||
'error', | ||
{ | ||
devDependencies: [ | ||
'**/scripts/**/*.ts', | ||
'**/*.test.*', | ||
'**/test/**/*.js', | ||
'**/test/**/*.ts' | ||
], | ||
optionalDependencies: false | ||
} | ||
], | ||
'import/prefer-default-export': 'off', | ||
'import/no-namespace': 'off', | ||
'import/no-named-export': 'off', | ||
'no-redeclare': 'off', | ||
'no-unused-vars': 'off', | ||
'prefer-object-spread': 'off', | ||
'spaced-comment': 'off', | ||
'prettier/prettier': [ | ||
'error', | ||
{ | ||
arrowParens: 'always', | ||
printWidth: 100, | ||
singleQuote: true, | ||
trailingComma: 'none', | ||
plugins: ['prettier-plugin-package'] | ||
} | ||
] | ||
// disabling sort keys for now so we can get the rest of the linting shored up | ||
'sort-keys': 'off', | ||
'typescript-sort-keys/interface': 'off' | ||
}, | ||
overrides: [ | ||
{ | ||
'files': ['**/test/**/*.{js,ts}'], | ||
'files': ['**/fixtures/**'], | ||
'rules': { | ||
'no-console': 'off' | ||
'no-console': 'off', | ||
'import/extensions': 'off', | ||
'import/no-unresolved': 'off' | ||
} | ||
}, | ||
{ | ||
'files': ['**/*.ts'], | ||
'files': ['**/test/**'], | ||
'rules': { | ||
'no-undef': 'off' | ||
'import/extensions': 'off' | ||
} | ||
} | ||
] | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Note: This file is necessary so that prettier writes which happen in hooks and scripts match the | ||
// same config that we're using from the eslint-config package. | ||
module.exports = require('eslint-config-rollup/prettier'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,8 +40,8 @@ export default { | |
plugins: [ | ||
dynamicImportVars({ | ||
// options | ||
}), | ||
], | ||
}) | ||
] | ||
}; | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.