-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
20,313 additions
and
4,812 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Please keep this file in sync with .prettierignore and .stylelintignore | ||
|
||
# Logs | ||
logs | ||
*.log | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
|
||
# Dependency directory | ||
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git | ||
node_modules | ||
|
||
# OSX | ||
.DS_Store | ||
|
||
.idea | ||
npm-debug.log.* | ||
*.css.d.ts | ||
*.sass.d.ts | ||
*.scss.d.ts | ||
|
||
# Packager output | ||
dist | ||
release | ||
temp-build | ||
|
||
# generated files | ||
package-lock.json |
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,123 @@ | ||
module.exports = { | ||
extends: [ | ||
// https://github.com/electron-react-boilerplate/eslint-config-erb/blob/main/index.js | ||
// airbnb rules are embedded in erb https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb | ||
'erb', | ||
], | ||
|
||
rules: { | ||
// #region From paranext-core root .eslintrc.js | ||
// Some rules are commented out since they have overrides in the | ||
// 'Overrides from paranext-core extension .eslintrc.cjs' section | ||
|
||
// #region ERB rules | ||
|
||
'import/extensions': 'off', | ||
// A temporary hack related to IDE not resolving correct package.json | ||
'import/no-extraneous-dependencies': 'off', | ||
'import/no-import-module-exports': 'off', | ||
// 'import/no-unresolved': 'error', | ||
'react/jsx-filename-extension': 'off', | ||
'react/react-in-jsx-scope': 'off', | ||
|
||
// #endregion | ||
|
||
// #region Paranext rules | ||
|
||
// Rules in each section are generally in alphabetical order. However, several | ||
// `@typescript-eslint` rules require disabling the equivalent ESLint rule. So in these cases | ||
// each ESLint rule is turned off immediately above the corresponding `@typescript-eslint` rule. | ||
'import/no-anonymous-default-export': ['error', { allowCallExpression: false }], | ||
'@typescript-eslint/explicit-member-accessibility': ['error', { accessibility: 'no-public' }], | ||
'lines-between-class-members': 'off', | ||
'@typescript-eslint/lines-between-class-members': [ | ||
'error', | ||
'always', | ||
{ exceptAfterSingleLine: true, exceptAfterOverload: true }, | ||
], | ||
'@typescript-eslint/member-ordering': 'error', | ||
'no-empty-function': 'off', | ||
'@typescript-eslint/no-empty-function': [ | ||
'error', | ||
{ | ||
allow: ['arrowFunctions', 'functions', 'methods'], | ||
}, | ||
], | ||
'@typescript-eslint/no-explicit-any': 'error', | ||
'@typescript-eslint/no-non-null-assertion': 'error', | ||
'no-redeclare': 'off', | ||
'@typescript-eslint/no-redeclare': 'error', | ||
'no-shadow': 'off', | ||
'@typescript-eslint/no-shadow': 'error', | ||
'no-use-before-define': 'off', | ||
'@typescript-eslint/no-use-before-define': [ | ||
'error', | ||
{ functions: false, allowNamedExports: true, typedefs: false, ignoreTypeReferences: true }, | ||
], | ||
'no-unused-vars': 'off', | ||
'@typescript-eslint/no-unused-vars': 'error', | ||
'no-useless-constructor': 'off', | ||
'@typescript-eslint/no-useless-constructor': 'error', | ||
'comma-dangle': ['error', 'always-multiline'], | ||
indent: 'off', | ||
'jsx-a11y/label-has-associated-control': [ | ||
'error', | ||
{ | ||
assert: 'either', | ||
}, | ||
], | ||
// Should use our logger anytime you want logs that persist. Otherwise use console only in testing | ||
'no-console': 'warn', | ||
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }], | ||
'prettier/prettier': ['warn', { tabWidth: 2, trailingComma: 'all' }], | ||
'react/jsx-indent-props': ['warn', 2], | ||
'react/jsx-props-no-spreading': ['error', { custom: 'ignore' }], | ||
'react/require-default-props': 'off', | ||
|
||
// #endregion | ||
|
||
// #endregion | ||
|
||
// #region Overrides from paranext-core extension .eslintrc.cjs | ||
|
||
'import/no-unresolved': ['error', { ignore: ['papi'] }], | ||
|
||
// #endregion | ||
}, | ||
globals: { | ||
globalThis: 'readonly', | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['*.js'], | ||
rules: { | ||
strict: 'off', | ||
}, | ||
}, | ||
{ | ||
// Don't require extensions to have a default export for "activate()" | ||
files: ['*.ts'], | ||
rules: { | ||
'import/prefer-default-export': 'off', | ||
}, | ||
}, | ||
], | ||
parserOptions: { | ||
ecmaVersion: 2020, | ||
sourceType: 'module', | ||
project: './tsconfig.json', | ||
tsconfigRootDir: __dirname, | ||
createDefaultProgram: true, | ||
}, | ||
plugins: ['@typescript-eslint'], | ||
settings: { | ||
'import/resolver': { | ||
typescript: { | ||
alwaysTryTypes: true, | ||
}, | ||
}, | ||
'import/parsers': { | ||
'@typescript-eslint/parser': ['.ts', '.tsx'], | ||
}, | ||
}, | ||
}; |
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 was deleted.
Oops, something went wrong.
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,12 @@ | ||
module.exports = { | ||
tabWidth: 2, | ||
trailingComma: 'all', | ||
endOfLine: 'lf', | ||
singleQuote: true, | ||
overrides: [ | ||
{ | ||
files: '*.json', | ||
options: { parser: 'json' }, | ||
}, | ||
], | ||
}; |
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,31 @@ | ||
# Please keep this file in sync with .eslintignore and .prettierignore | ||
|
||
# Logs | ||
logs | ||
*.log | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
|
||
# Dependency directory | ||
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git | ||
node_modules | ||
|
||
# OSX | ||
.DS_Store | ||
|
||
.idea | ||
npm-debug.log.* | ||
*.css.d.ts | ||
*.sass.d.ts | ||
*.scss.d.ts | ||
|
||
# Packager output | ||
dist | ||
release | ||
temp-build | ||
|
||
# generated files | ||
package-lock.json |
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,17 @@ | ||
module.exports = { | ||
extends: ['stylelint-config-recommended', 'stylelint-config-sass-guidelines'], | ||
overrides: [ | ||
{ | ||
files: ['**/*.scss'], | ||
customSyntax: 'postcss-scss', | ||
}, | ||
], | ||
rules: { | ||
'color-named': null, | ||
'function-parentheses-space-inside': null, | ||
'max-nesting-depth': 2, | ||
'no-descending-specificity': null, | ||
'selector-max-compound-selectors': 4, | ||
'selector-max-id': 1, | ||
}, | ||
}; |
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.