Skip to content

Commit

Permalink
upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
simbo committed Nov 23, 2023
1 parent 2ac2ee6 commit 1d86bfe
Show file tree
Hide file tree
Showing 15 changed files with 12,284 additions and 7,277 deletions.
260 changes: 13 additions & 247 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,258 +4,24 @@
"es6": true,
"node": true
},
"globals": {},
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier", "plugin:unicorn/all"],
"ignorePatterns": ["/dist/**/*"],
"overrides": [],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"project": "tsconfig.eslint.json",
"sourceType": "module"
},
"plugins": ["import", "unicorn", "jsdoc", "prefer-arrow", "editorconfig", "@typescript-eslint"],
"plugins": ["@typescript-eslint"],
"rules": {
"@typescript-eslint/array-type": [
"error",
{
"default": "array"
}
],
"@typescript-eslint/await-thenable": ["error"],
"@typescript-eslint/consistent-type-definitions": ["error"],
"@typescript-eslint/dot-notation": ["error"],
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowConciseArrowFunctionExpressionsStartingWithVoid": true,
"allowDirectConstAssertionInArrowFunctions": true,
"allowExpressions": true,
"allowHigherOrderFunctions": true,
"allowTypedFunctionExpressions": true
}
],
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "explicit",
"overrides": {
"accessors": "explicit",
"constructors": "no-public",
"methods": "explicit",
"parameterProperties": "explicit",
"properties": "explicit"
}
}
],
"@typescript-eslint/indent": ["off"],
"@typescript-eslint/member-delimiter-style": [
"error",
{
"multiline": {
"delimiter": "semi",
"requireLast": true
},
"singleline": {
"delimiter": "semi",
"requireLast": false
}
}
],
"@typescript-eslint/member-ordering": ["error"],
"@typescript-eslint/method-signature-style": ["error"],
"@typescript-eslint/naming-convention": [
"error",
{
"format": ["camelCase"],
"leadingUnderscore": "allow",
"selector": "default",
"trailingUnderscore": "allow"
},
{
"format": ["camelCase", "UPPER_CASE"],
"leadingUnderscore": "allow",
"selector": "variable",
"trailingUnderscore": "allow"
},
{
"format": ["PascalCase"],
"selector": "typeLike"
},
{
"format": ["PascalCase"],
"selector": "enumMember"
}
],
"@typescript-eslint/no-empty-function": ["error"],
"@typescript-eslint/no-empty-interface": ["error"],
"@typescript-eslint/no-explicit-any": ["off"],
"@typescript-eslint/no-inferrable-types": [
"error",
{
"ignoreParameters": true
}
],
"@typescript-eslint/no-misused-new": ["error"],
"@typescript-eslint/no-non-null-assertion": ["error"],
"@typescript-eslint/no-parameter-properties": ["off"],
"@typescript-eslint/no-require-imports": ["error"],
"@typescript-eslint/no-shadow": ["error"],
"@typescript-eslint/no-unused-expressions": ["error"],
"@typescript-eslint/no-var-requires": ["off"],
"@typescript-eslint/prefer-for-of": ["error"],
"@typescript-eslint/prefer-function-type": ["error"],
"@typescript-eslint/prefer-namespace-keyword": ["error"],
"@typescript-eslint/prefer-readonly": ["error"],
"@typescript-eslint/promise-function-async": ["error"],
"@typescript-eslint/quotes": ["error", "single"],
"@typescript-eslint/semi": ["error", "always"],
"@typescript-eslint/type-annotation-spacing": ["error"],
"@typescript-eslint/typedef": [
"error",
{
"arrayDestructuring": false,
"arrowParameter": false,
"memberVariableDeclaration": false,
"objectDestructuring": false,
"parameter": false,
"propertyDeclaration": false,
"variableDeclaration": false,
"variableDeclarationIgnoreFunction": false
}
],
"@typescript-eslint/unified-signatures": ["error"],
"arrow-parens": ["error", "as-needed"],
"brace-style": ["error", "1tbs"],
"comma-dangle": ["error"],
"complexity": [
"error",
{
"max": 12
}
],
"constructor-super": ["error"],
"curly": ["error"],
"default-case": ["error"],
"editorconfig/charset": ["error"],
"editorconfig/eol-last": ["error"],
"editorconfig/indent": ["off"],
"editorconfig/linebreak-style": ["error"],
"editorconfig/no-trailing-spaces": ["error"],
"eol-last": ["off"],
"eqeqeq": ["error", "always"],
"guard-for-in": ["error"],
"id-blacklist": [
"error",
"any",
"Number",
"number",
"String",
"string",
"Boolean",
"boolean",
"Undefined",
"undefined"
],
"id-match": ["error"],
"import/no-deprecated": ["warn"],
"import/order": [
"error",
{
"alphabetize": {
"caseInsensitive": true,
"order": "asc"
},
"groups": ["builtin", "external", "internal"],
"newlines-between": "always"
}
],
"jsdoc/check-alignment": ["error"],
"jsdoc/check-indentation": ["error"],
"jsdoc/newline-after-description": ["error"],
"jsdoc/no-types": ["error"],
"linebreak-style": ["off"],
"max-classes-per-file": ["off"],
"max-len": [
"error",
{
"code": 120
}
],
"no-bitwise": ["error"],
"no-caller": ["error"],
"no-console": [
"error",
{
"allow": [
"warn",
"dir",
"timeLog",
"assert",
"clear",
"count",
"countReset",
"group",
"groupEnd",
"table",
"dirxml",
"error",
"groupCollapsed",
"Console",
"profile",
"profileEnd",
"timeStamp",
"context"
]
}
],
"no-debugger": ["error"],
"no-duplicate-imports": ["error"],
"no-empty": ["error"],
"no-eval": ["error"],
"no-fallthrough": ["error"],
"no-irregular-whitespace": ["error"],
"no-multiple-empty-lines": [
"error",
{
"max": 2
}
],
"no-new-wrappers": ["error"],
"no-redeclare": ["error"],
"no-restricted-imports": ["error", "rxjs/Rx"],
"no-return-await": ["error"],
"no-shadow": ["off"],
"no-throw-literal": ["error"],
"no-trailing-spaces": ["off"],
"no-undef-init": ["error"],
"no-underscore-dangle": ["error"],
"no-unused-labels": ["error"],
"no-var": ["error"],
"prefer-arrow/prefer-arrow-functions": [
"error",
{
"allowStandaloneDeclarations": true,
"disallowPrototype": false,
"singleReturnOnly": false
}
],
"prefer-const": ["error"],
"quote-props": ["error", "as-needed"],
"radix": ["error"],
"space-before-function-paren": [
"error",
{
"anonymous": "always",
"asyncArrow": "always",
"named": "never"
}
],
"space-in-parens": ["error", "never"],
"spaced-comment": [
"error",
"always",
{
"markers": ["/"]
}
],
"unicode-bom": ["off"],
"unicorn/filename-case": ["error"]
"unicorn/consistent-function-scoping": ["error", { "checkArrowFunctions": false }],
"no-console": "warn",
"unicorn/no-array-for-each": "off",
"unicorn/no-array-reduce": "off",
"unicorn/no-for-loop": "off",
"unicorn/no-null": "off",
"unicorn/number-literal-case": "off",
"unicorn/prevent-abbreviations": "off"
}
}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14
20
19 changes: 16 additions & 3 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
{
"trailingComma": "none",
"singleQuote": true,
"plugins": ["@ianvs/prettier-plugin-sort-imports"],
"importOrder": ["<BUILTIN_MODULES>", "", "<THIRD_PARTY_MODULES>", "", "^src/", "", "^\\.\\.(/|$)", "", "^\\.(/|$)"],
"importOrderParserPlugins": ["typescript", "decorators-legacy"],
"arrowParens": "avoid",
"printWidth": 120
"importOrderTypeScriptVersion": "5.2.2",
"printWidth": 120,
"singleQuote": true,
"trailingComma": "none",
"overrides": [
{
"files": "*.md",
"options": {
"printWidth": 80,
"proseWrap": "always"
}
}
]
}
14 changes: 9 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"eslint.lintTask.options": " -c .eslintrc --ext .ts,.tsx,.js,jsx .",
"prettier.configPath": "./.prettierrc",
"prettier.packageManager": "yarn",
"prettier.prettierPath": "./node_modules/prettier"
"prettier.prettierPath": "./node_modules/prettier/index.cjs",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"javascript.preferences.importModuleSpecifier": "relative",
"javascript.preferences.importModuleSpecifierEnding": "minimal",
"javascript.updateImportsOnFileMove.enabled": "always",
"typescript.preferences.importModuleSpecifier": "relative",
"typescript.preferences.importModuleSpecifierEnding": "minimal",
"typescript.updateImportsOnFileMove.enabled": "always"
}
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# 🗃 Small Store

[![npm Package Version](https://img.shields.io/npm/v/small-store?)](https://www.npmjs.com/package/small-store)
[![Package Dependencies](https://img.shields.io/david/simbo/small-store?label=deps)](https://www.npmjs.com/package/small-store?activeTab=dependencies)
![Libraries.io dependency status for latest release](https://img.shields.io/librariesio/release/npm/small-store)
[![Coveralls github](https://img.shields.io/coveralls/github/simbo/small-store)](https://coveralls.io/github/simbo/small-store)
[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/simbo/small-store/CI/master)](https://github.com/simbo/small-store/actions?query=workflow%3ACI)
[![Last CI Workflow Status](https://img.shields.io/github/actions/workflow/status/simbo/small-store/ci.yml?branch=master)](https://github.com/simbo/small-store/actions?query=workflow%3ACI)
[![GitHub Repo](https://img.shields.io/badge/repo-public-87ceeb)](https://github.com/simbo/small-store)
[![License MIT](https://img.shields.io/badge/license-MIT-4cc552)](http://simbo.mit-license.org/)

Expand Down Expand Up @@ -47,7 +47,10 @@ const initialCounterState: CounterState = {
};

// creating the store
const counterStore = new Store<CounterState, CounterAction>(initialCounterState, counterActions);
const counterStore = new Store<CounterState, CounterAction>(
initialCounterState,
counterActions
);

// subscribing to the store's state
counterStore.state$.subscribe(state => console.log(state));
Expand Down
9 changes: 6 additions & 3 deletions docs/index.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ language_tabs:
- javascript

toc_footers:
- <a href='https://github.com/simbo/small-store' target='_blank'>small-store on GitHub</a>
- <a href='https://www.npmjs.com/package/small-store' target='_blank'>small-store on npm</a>
- <a href='https://github.com/simbo/small-store' target='_blank'>small-store
on GitHub</a>
- <a href='https://www.npmjs.com/package/small-store'
target='_blank'>small-store on npm</a>

includes:
- 01_getting-started
Expand Down Expand Up @@ -66,7 +68,8 @@ version conflicts and keep your bundles small)
can be used anywhere: browser, server, mobile or on the moon

⭐️  **framework agnostic**
can be used with anything: vanilla, react, preact, angular, vue or whatever you prefer
can be used with anything: vanilla, react, preact, angular, vue or whatever you
prefer

⭐️  **native typescript support**

Expand Down
6 changes: 4 additions & 2 deletions docs/static/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ This is the generated documentation for _small-store_ – a small, immutable,
reactive and framework agnostic state store under 2KB powered by rxjs and immer
with native typescript support.

Visit the documentation website at [simbo.codes/small-store](https://simbo.codes/small-store).
Visit the documentation website at
[simbo.codes/small-store](https://simbo.codes/small-store).

See the project repository at [github.com/simbo/small-store](https://github.com/simbo/small-store).
See the project repository at
[github.com/simbo/small-store](https://github.com/simbo/small-store).

## License and Author

Expand Down
7 changes: 5 additions & 2 deletions docs/stylesheets/_icon-font.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
@font-face {
font-family: 'slate';
src: font-url('slate.eot?-syv14m');
src: font-url('slate.eot?#iefix-syv14m') format('embedded-opentype'), font-url('slate.woff2?-syv14m') format('woff2'),
font-url('slate.woff?-syv14m') format('woff'), font-url('slate.ttf?-syv14m') format('truetype'),
src:
font-url('slate.eot?#iefix-syv14m') format('embedded-opentype'),
font-url('slate.woff2?-syv14m') format('woff2'),
font-url('slate.woff?-syv14m') format('woff'),
font-url('slate.ttf?-syv14m') format('truetype'),
font-url('slate.svg?-syv14m#slate') format('svg');
font-weight: normal;
font-style: normal;
Expand Down
Loading

0 comments on commit 1d86bfe

Please sign in to comment.