Skip to content

Commit

Permalink
Prepare next release
Browse files Browse the repository at this point in the history
  • Loading branch information
kaisalmen committed Jan 29, 2023
1 parent ecb2f9d commit ac39f21
Show file tree
Hide file tree
Showing 10 changed files with 306 additions and 291 deletions.
77 changes: 77 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
env: {
node: true,
browser: true,
es2020: true
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended'
],
overrides: [
],
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module'
},
plugins: [
'@typescript-eslint'
],
ignorePatterns: [
'**/{node_modules,dist,lib,out,bin}',
'**/generated/**/*',
'.eslintrc.js'
],
rules: {
// List of [ESLint rules](https://eslint.org/docs/rules/)
'arrow-parens': ['off', 'as-needed'], // do not force arrow function parentheses
'constructor-super': 'error', // checks the correct use of super() in sub-classes
'dot-notation': 'error', // obj.a instead of obj['a'] when possible
'eqeqeq': 'error', // ban '==', don't use 'smart' option!
'guard-for-in': 'error', // needs obj.hasOwnProperty(key) checks
'new-parens': 'error', // new Error() instead of new Error
'no-bitwise': 'error', // bitwise operators &, | can be confused with &&, ||
'no-caller': 'error', // ECMAScript deprecated arguments.caller and arguments.callee
'no-cond-assign': 'error', // assignments if (a = '1') are error-prone
'no-debugger': 'error', // disallow debugger; statements
'no-eval': 'error', // eval is considered unsafe
'no-inner-declarations': 'off', // we need to have 'namespace' functions when using TS 'export ='
'no-labels': 'error', // GOTO is only used in BASIC ;)
'no-multiple-empty-lines': ['error', { 'max': 1 }], // two or more empty lines need to be fused to one
'no-new-wrappers': 'error', // there is no reason to wrap primitve values
'no-throw-literal': 'error', // only throw Error but no objects {}
'no-trailing-spaces': 'error', // trim end of lines
'no-unsafe-finally': 'error', // safe try/catch/finally behavior
'no-var': 'error', // use const and let instead of var
'space-before-function-paren': ['error', { // space in function decl: f() vs async () => {}
'anonymous': 'never',
'asyncArrow': 'always',
'named': 'never'
}],
'semi': [2, 'always'], // Always use semicolons at end of statement
'quotes': [2, 'single', { 'avoidEscape': true }], // Prefer single quotes
'use-isnan': 'error', // isNaN(i) Number.isNaN(i) instead of i === NaN
// List of [@typescript-eslint rules](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#supported-rules)
'@typescript-eslint/adjacent-overload-signatures': 'error', // grouping same method names
'@typescript-eslint/array-type': ['error', { // string[] instead of Array<string>
'default': 'array-simple'
}],
'@typescript-eslint/ban-types': 'error', // bans types like String in favor of string
'@typescript-eslint/indent': 'error', // consistent indentation
'@typescript-eslint/no-explicit-any': 'error', // don't use :any type
'@typescript-eslint/no-misused-new': 'error', // no constructors for interfaces or new for classes
'@typescript-eslint/no-namespace': 'off', // disallow the use of custom TypeScript modules and namespaces
'@typescript-eslint/no-non-null-assertion': 'off', // allow ! operator
'@typescript-eslint/no-parameter-properties': 'error', // no property definitions in class constructors
'@typescript-eslint/no-unused-vars': ['error', { // disallow Unused Variables
'argsIgnorePattern': '^_'
}],
'@typescript-eslint/no-var-requires': 'error', // use import instead of require
'@typescript-eslint/prefer-for-of': 'error', // prefer for-of loop over arrays
'@typescript-eslint/prefer-namespace-keyword': 'error', // prefer namespace over module in TypeScript
'@typescript-eslint/triple-slash-reference': 'error', // ban /// <reference />, prefer imports
'@typescript-eslint/type-annotation-spacing': 'error' // consistent space around colon ':'
}
}
65 changes: 0 additions & 65 deletions .eslintrc.json

This file was deleted.

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 2.2.0

- `DataPayload#applyProperties` allows any object as input and the params are more relaxed. A first set of uit tests has been introduced.
- Set compiler `target` and `module` to `ES2020`. `moduleResolution` is now `Node16` instead of `Node`,

## 2.1.0

- Export an esm bundle along with raw code
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ There exist three possibilities:
- Checkout the repository and run `npm install`, `npm run build` and then `npm run dev` to spin up the local Vite dev server
- Press the `Gitpod` button above and start coding and using the examples directly in the browser
- Checkout the repository and use `docker-compose up -d` to spin up local snowpack dev server
- Checkout the repository and use `docker-compose up -d` to spin up local Vite dev server
Whatever environment you choose to start [Vite](https://vitejs.dev/) is used to serve the code and the examples using it. With this setup you are able to change the code and examples without invoking an additional bundler. Vite ensures all imported npm modules are available if previously installed in local environment (see `npm install`).
Expand Down Expand Up @@ -102,8 +102,7 @@ The following table describes the currently implemented execution workflow of `W
## Main Branches
Main development takes place on branch [main](https://github.com/kaisalmen/three-wtm/tree/main).<br>
The [stable](https://github.com/kaisalmen/three-wtm/tree/stable) branch contains the released versions.
Main development takes place on branch [main](https://github.com/kaisalmen/three-wtm/tree/main).
## Docs
Expand Down
Loading

0 comments on commit ac39f21

Please sign in to comment.