Skip to content

Commit

Permalink
feat: remove beemo (#759)
Browse files Browse the repository at this point in the history
  • Loading branch information
domoritz authored Apr 20, 2023
1 parent 6dfbead commit 1dadf6a
Show file tree
Hide file tree
Showing 16 changed files with 663 additions and 1,704 deletions.
8 changes: 0 additions & 8 deletions .config/beemo.ts

This file was deleted.

9 changes: 0 additions & 9 deletions .config/beemo/eslint.ts

This file was deleted.

7 changes: 0 additions & 7 deletions .config/beemo/jest.ts

This file was deleted.

9 changes: 0 additions & 9 deletions .config/beemo/typescript.ts

This file was deleted.

10 changes: 10 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.eslintrc.js
babel.config.js
prettier.config.js
jest.config.js
rollup.config.js
build
build-es5
dist
coverage
types
62 changes: 62 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'prettier', 'jest'],
extends: [
'eslint:recommended',
'plugin:jest/recommended',
'plugin:jest/style',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended'
],
env: {
browser: true,
node: true
},
parserOptions: {
project: 'tsconfig.json',
ecmaVersion: 2020,
sourceType: 'module'
},
overrides: [
{
files: ['*.ts']
}
],
rules: {
'prettier/prettier': 'warn',
// https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#supported-rules
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/ban-types': 'warn',
'@typescript-eslint/prefer-for-of': 'error',
'@typescript-eslint/no-for-in-array': 'error',
'@typescript-eslint/no-require-imports': 'error',
'@typescript-eslint/no-parameter-properties': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
vars: 'all',
args: 'after-used',
ignoreRestSiblings: true
}
],
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'error',
'@typescript-eslint/no-object-literal-type-assertion': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-namespace': 'error',
'jest/no-conditional-expect': 'off',
// https://eslint.org/docs/rules/
'linebreak-style': ['error', 'unix'],
'no-irregular-whitespace': ['error', {skipComments: true}],
'no-alert': 'error',
'prefer-const': 'error',
'no-return-assign': 'error',
'no-useless-call': 'error',
'no-useless-concat': 'error',
"prefer-template": "error",
'no-undef': 'off', // typescript takes care of this for us
'no-unreachable': 'off' // typescript takes care of this for us
}
};
9 changes: 0 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
.DS_Store
.eslintignore
.eslintrc.js
.prettierignore
babel.config.js
beemo-error.log
build
coverage/
examples/data
jest.config.js
node_modules
npm-debug.log*
prettier.config.js
src/style.ts
tsconfig.json
yarn-debug.log*
yarn-error.log*
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.eslintrc.js
babel.config.js
jest.config.js
prettier.config.js
tsconfig.json
13 changes: 13 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
"presets": [
[
"@babel/env",
{
"targets": {
"node": "current"
}
}
],
"@babel/typescript"
]
};
5 changes: 5 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
exports = {
preset: 'ts-jest/presets/default-esm',
coverageDirectory: './coverage/',
collectCoverage: false
};
36 changes: 23 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,33 +51,43 @@
"serve": "browser-sync start -s -f build examples --serveStatic examples",
"start": "yarn build && concurrently --kill-others -n Server,Rollup 'yarn serve' 'rollup -c -w'",
"pretest": "yarn build:style",
"test": "beemo jest",
"test": "jest",
"test:inspect": "node --inspect-brk ./node_modules/.bin/jest --runInBand",
"prepare": "beemo create-config && yarn copy:data",
"prettierbase": "beemo prettier '*.{css,scss,html}'",
"eslintbase": "beemo eslint .",
"format": "yarn eslintbase --fix && yarn prettierbase --write",
"lint": "yarn eslintbase && yarn prettierbase --check",
"prepare": "yarn copy:data",
"prettierbase": "prettier '*.{css,scss,html}'",
"format": "eslint . --fix && yarn prettierbase --write",
"lint": "eslint . && yarn prettierbase --check",
"release": "release-it"
},
"devDependencies": {
"@babel/core": "^7.21.4",
"@babel/plugin-transform-runtime": "^7.21.4",
"@babel/preset-env": "^7.21.4",
"@babel/preset-typescript": "^7.21.4",
"@release-it/conventional-changelog": "^5.1.1",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-terser": "^0.4.0",
"@rollup/plugin-node-resolve": "^15.0.2",
"@rollup/plugin-terser": "^0.4.1",
"@typescript-eslint/eslint-plugin": "^5.59.0",
"@typescript-eslint/parser": "^5.59.0",
"browser-sync": "^2.29.1",
"concurrently": "^8.0.1",
"eslint": "^8.38.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-prettier": "^4.2.1",
"gh-pages": "^5.0.0",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"path": "^0.12.7",
"release-it": "^15.10.0",
"prettier": "^2.8.7",
"release-it": "^15.10.1",
"rollup": "^3.20.6",
"rollup-plugin-bundle-size": "^1.0.3",
"rollup-plugin-ts": "^3.2.0",
"rollup": "^3.20.2",
"sass": "^1.60.0",
"typescript": "~5.0.3",
"sass": "^1.62.0",
"typescript": "~5.0.4",
"vega-datasets": "^2.7.0",
"vega-lite-dev-config": "^0.21.0",
"vega-typings": "^0.24.0"
},
"dependencies": {
Expand Down
13 changes: 13 additions & 0 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
"printWidth": 120,
"proseWrap": "never",
"overrides": [
{
"files": "*.{js,jsx,ts,tsx}",
"options": {
"bracketSpacing": false,
"singleQuote": true
}
}
]
};
7 changes: 4 additions & 3 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import json from '@rollup/plugin-json';
import resolve from '@rollup/plugin-node-resolve';
import ts from 'rollup-plugin-ts';
import bundleSize from 'rollup-plugin-bundle-size';
import terser from '@rollup/plugin-terser';
import bundleSize from 'rollup-plugin-bundle-size';
import ts from 'rollup-plugin-ts';

import pkg from './package.json' assert { type: 'json' };

Expand All @@ -15,6 +15,7 @@ const plugins = (browserslist, declaration) => [
declaration,
declarationMap: declaration
}),
transpiler: "babel",
browserslist
}),
bundleSize()
Expand Down Expand Up @@ -55,7 +56,7 @@ const outputs = [
plugins: [terser()],
}
],
plugins: plugins('> 1%, not dead', false),
plugins: plugins('defaults', false),
external: ['vega-util']
}
];
Expand Down
4 changes: 4 additions & 0 deletions test/Handler.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @jest-environment jsdom
*/

import {Item} from 'vega-typings/types';
import {DEFAULT_OPTIONS, Handler} from '../src';

Expand Down
21 changes: 21 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"compilerOptions": {
"target": "es2020",
"module": "es2020",
"moduleResolution": "node",
"noEmit": true,
"esModuleInterop": true,
"strict": true,
"allowSyntheticDefaultImports": true,
"importHelpers": true,
"resolveJsonModule": true,
"typeRoots": [
"node_modules/@types",
"types"
]
},
"include": [
"src/**/*.ts",
"test/**/*.ts"
]
}
Loading

0 comments on commit 1dadf6a

Please sign in to comment.