Skip to content

Commit ab9f9ee

Browse files
authored
Add eslint/prettier (#145)
Add eslint/prettier
1 parent 001ca04 commit ab9f9ee

23 files changed

+4058
-2054
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
src/core/datagrid.ts
2+
src/core/graphicscontext.ts
3+
src/tests

.eslintrc.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
3+
parserOptions: {
4+
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
5+
sourceType: 'module', // Allows for the use of imports
6+
},
7+
extends: [
8+
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from @typescript-eslint/eslint-plugin
9+
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
10+
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
11+
],
12+
rules: {
13+
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
14+
'@typescript-eslint/no-namespace': 'off',
15+
'@typescript-eslint/no-var-requires': 'off',
16+
'@typescript-eslint/ban-ts-comment': 'off'
17+
},
18+
};
19+

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,6 @@ ipydatagrid/labextension/*.tgz
156156

157157
# Packed lab extensions
158158
ipydatagrid/labextension
159+
160+
conda_out
161+
recipe

.prettierrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
semi: true,
3+
trailingComma: "all",
4+
singleQuote: true,
5+
printWidth: 80,
6+
tabWidth: 2
7+
};

0 commit comments

Comments
 (0)