Skip to content

Commit

Permalink
prep for v2:
Browse files Browse the repository at this point in the history
* Remove geom code, import from tiled-geometry package
* No need for built code to be in repo (it goes to npm)
* Stricter linting
* Smaller npm download

Note, breaking change:
* MaskRect -> MaskRectangle
  • Loading branch information
sbj42 committed Jan 24, 2021
1 parent d004ef3 commit 90adcc4
Show file tree
Hide file tree
Showing 50 changed files with 121 additions and 2,266 deletions.
80 changes: 50 additions & 30 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,56 +1,76 @@
module.exports = {
'env': {
'browser': true,
'es6': true,
'node': true
'es2021': true,
'node': true,
},
'extends': [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended'
'plugin:@typescript-eslint/recommended',
],
'globals': {
'Atomics': 'readonly',
'SharedArrayBuffer': 'readonly'
},
'parser': '@typescript-eslint/parser',
'parserOptions': {
'ecmaVersion': 2018,
'sourceType': 'module'
'ecmaVersion': 12,
'sourceType': 'module',
},
'plugins': [
'@typescript-eslint'
'@typescript-eslint',
],
'rules': {
'indent': [
'off'
],
'linebreak-style': [
'off'
'error',
4,
{
'SwitchCase': 1,
},
],
'quotes': [
'error',
'single',
{
'avoidEscape': true,
'allowTemplateLiterals': true
}
'allowTemplateLiterals': true,
},
],
'semi': [
'error',
'always'
'always',
],
'no-console': [
'error',
],
'eqeqeq': [
'error',
],
'no-invalid-this': [
'error',
],
'no-throw-literal': [
'error',
],
'curly': [
'error',
],
'@typescript-eslint/explicit-function-return-type': [
'off'
'brace-style': [
'error',
],
'@typescript-eslint/no-unused-vars': [
'off'
'camelcase': [
'error',
],
'@typescript-eslint/no-use-before-define': [
'off'
'comma-dangle': [
'error',
'always-multiline',
],
'@typescript-eslint/explicit-module-boundary-types': [
'off'
]
}
};
'comma-style': [
'error',
],
'no-trailing-spaces': [
'error',
],
'no-var': [
'error',
],
'@typescript-eslint/no-shadow': [
'error',
],
},
};
9 changes: 4 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
npm-debug.log*
/node_modules
/.vscode
/local
/coverage
/node_modules/
/local/
/coverage/
/lib/
12 changes: 0 additions & 12 deletions .npmignore

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# TheField

![Dependencies](https://img.shields.io/badge/dependencies-none-green.svg)
![Dependencies](https://img.shields.io/badge/dependencies-1-green.svg)
[![Node.js CI](https://github.com/sbj42/the-field/workflows/Node.js%20CI/badge.svg)](https://github.com/sbj42/the-field/actions?query=workflow%3A%22Node.js+CI%22)
[![License](https://img.shields.io/github/license/sbj42/the-field.svg)](https://github.com/sbj42/the-field)

Expand Down
4 changes: 2 additions & 2 deletions benchmark/bench-field-of-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import * as seedrandom from 'seedrandom';

import {FieldOfViewMap} from '../src';

// tslint:disable:no-console
/* eslint-disable no-console */

const suite = new Benchmark.Suite();
suite.on('cycle', (event: any) => {
suite.on('cycle', (event: {target: string}) => {
console.log(`field-of-view/${event.target}`);
});
const width = 31;
Expand Down
Loading

0 comments on commit 90adcc4

Please sign in to comment.