mirror of
https://github.com/Choices-js/Choices.git
synced 2024-05-21 15:06:45 +02:00
68313da412
* Typescript config setup * Add type annotations to components * Further type additions * And more... * Add types to actions * Add types to templates * Further type checks * Further type additons * Install fuse latest * Housekeeping * Remove old type definitions * Fix remaning type issues * Fix some failing tests * Remove types workflow * Fix failing unit tests * Resolve back space event regression * Convert cypress files to .ts * Fix eslint issues * Remove cachebusting urls * Resolve delete button bug * Resolve regression bugs * Fix lint script * Fix lint workflow * Pass args instead of object to keyboard handlers * Flatten misc reducer * Resolve keyboad action test failures * Use Pick instead of Partial * Use interfaces in action tests * Update firefox image * Incorporate #791 * Incorporate #788
113 lines
2.5 KiB
JSON
113 lines
2.5 KiB
JSON
{
|
|
"parser": "@typescript-eslint/parser",
|
|
"plugins": ["@typescript-eslint", "prettier", "sort-class-members"],
|
|
"extends": [
|
|
"airbnb-base",
|
|
"plugin:prettier/recommended",
|
|
"plugin:compat/recommended",
|
|
"plugin:@typescript-eslint/recommended"
|
|
],
|
|
"env": {
|
|
"es6": true,
|
|
"browser": true,
|
|
"mocha": true,
|
|
"cypress/globals": true
|
|
},
|
|
"parserOptions": {
|
|
"project": "./tsconfig.json",
|
|
"ecmaVersion": 2020
|
|
},
|
|
"rules": {
|
|
"import/prefer-default-export": "off",
|
|
"import/no-extraneous-dependencies": [
|
|
"error",
|
|
{
|
|
"devDependencies": true
|
|
}
|
|
],
|
|
"no-console": [
|
|
"warn",
|
|
{
|
|
"allow": ["warn", "error"]
|
|
}
|
|
],
|
|
"no-plusplus": "off",
|
|
"no-unused-expressions": "off",
|
|
"no-underscore-dangle": "off",
|
|
"consistent-return": "off",
|
|
"import/no-useless-path-segments": "warn",
|
|
"prefer-destructuring": [
|
|
"warn",
|
|
{
|
|
"array": false,
|
|
"object": true
|
|
}
|
|
],
|
|
"curly": ["error", "all"],
|
|
"newline-before-return": "error",
|
|
"sort-class-members/sort-class-members": [
|
|
2,
|
|
{
|
|
"order": [
|
|
"[static-properties]",
|
|
"[static-methods]",
|
|
"[properties]",
|
|
"[conventional-private-properties]",
|
|
"constructor",
|
|
"[methods]",
|
|
"[conventional-private-methods]"
|
|
],
|
|
"accessorPairPositioning": "getThenSet"
|
|
}
|
|
],
|
|
"lines-between-class-members": "off",
|
|
"@typescript-eslint/no-namespace": "off"
|
|
},
|
|
"overrides": [
|
|
{
|
|
"files": ["*.test.ts"],
|
|
"env": {
|
|
"mocha": true
|
|
},
|
|
"rules": {
|
|
"no-restricted-syntax": "off",
|
|
"compat/compat": "off",
|
|
"no-new": "off",
|
|
"@typescript-eslint/no-empty-function": "off",
|
|
"@typescript-eslint/no-explicit-any": "off",
|
|
"@typescript-eslint/no-non-null-assertion": "off"
|
|
}
|
|
},
|
|
{
|
|
"files": ["cypress/**"],
|
|
"plugins": ["cypress"],
|
|
"rules": {
|
|
"no-unused-vars": "warn"
|
|
},
|
|
"env": {
|
|
"cypress/globals": true
|
|
}
|
|
}
|
|
],
|
|
"settings": {
|
|
"polyfills": [
|
|
"Array.from",
|
|
"Array.prototype.find",
|
|
"Array.prototype.includes",
|
|
"Symbol",
|
|
"Symbol.iterator",
|
|
"DOMTokenList",
|
|
"Object.assign",
|
|
"CustomEvent",
|
|
"Element.prototype.classList",
|
|
"Element.prototype.closest",
|
|
"Element.prototype.dataset"
|
|
],
|
|
"import/resolver": {
|
|
"node": {
|
|
"extensions": [".js", ".ts"]
|
|
}
|
|
}
|
|
}
|
|
}
|