Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React leaflet 3 #214

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 0 additions & 91 deletions .babelrc

This file was deleted.

54 changes: 54 additions & 0 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
const targets = {
node: 'current',
browsers: [
'last 2 Chrome versions',
'last 2 Edge versions',
'last 2 Firefox versions',
'last 2 iOS versions',
'last 2 Opera versions',
'last 2 Safari versions',
'last 2 Samsung versions',
],
}

module.exports = {
presets: ['@babel/preset-react', '@babel/preset-typescript'],
env: {
development: {
presets: [
[
'@babel/preset-env',
{
loose: true,
modules: 'commonjs',
targets,
},
],
],
},
rollup: {
presets: [
[
'@babel/preset-env',
{
loose: true,
modules: false,
targets,
},
],
],
},
esm: {
presets: [
[
'@babel/preset-env',
{
loose: true,
modules: false,
targets,
},
],
],
},
},
}
94 changes: 30 additions & 64 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,76 +1,42 @@
{
"extends": ["eslint-config-airbnb", "plugin:flowtype/recommended", "prettier"],
"parser": "babel-eslint",
"env": {
"browser": true,
"mocha": true,
"node": true
"es6": true
},
"globals": {
"__data": true,
"expect": true,
"ga": true,
"Intercom": true,
"spy": true,
"sinon": true,
"Raven": true,
"Highcharts": true
"extends": [
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"jsx": true,
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "prettier", "react", "react-hooks"],
"rules": {
"comma-dangle": 0,
"no-wrap-func": 0,
"spaced-comment": 0,
"eqeqeq": [2, "smart"],

// Portal uses some camelcase
"camelcase": 1,

// used for creating new Immutable Lists and Maps
"new-cap": [1, { "capIsNewExceptions": ["Immutable"] }],

// Sometimes short variable names are okay
"id-length": 0,

// Doesn't play nice with chai's assertions
"no-unused-expressions": 0,

"react/jsx-uses-react": 2,
"react/jsx-uses-vars": 2,
"react/react-in-jsx-scope": 2,
"react/jsx-no-duplicate-props": 2,

// Discourages microcomponentization
"react/no-multi-comp": 0,

//Temporarirly disabled due to a possible bug in babel-eslint (todomvc example)
"block-scoped-var": 0,
// Temporarily disabled for test/* until babel/babel-eslint#33 is resolved
"padded-blocks": 0,
"no-param-reassign": 0,

// Allow ++ and --
"no-plusplus": "off",

// Allow dangling underscores
"no-underscore-dangle": "off",

"import/no-extraneous-dependencies": [
"@typescript-eslint/ban-ts-comment": "warn",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{ "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }
],
"prettier/prettier": [
"error",
{
"devDependencies": true
"jsxBracketSameLine": true,
"semi": false,
"singleQuote": true,
"trailingComma": "all"
}
],

// Left as-is since this is overkill
"class-methods-use-this": "off",

// Any prettier issues are now considered eslint issues
"prettier/prettier": ["error"],

// This is because we use `array` and `object`.
// `array` is ok because we require latitude, longitude and intensity extractors
// `object` is used with the gradient object, and proptypes can't encode the shape of a gradient correctly
"react/forbid-prop-types": "off"
"react/prop-types": "warn"
},
"plugins": ["react", "lean-imports", "flowtype", "prettier"]
"settings": {
"react": {
"version": "17.0"
}
}
}
29 changes: 0 additions & 29 deletions .flowconfig

This file was deleted.

5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,8 @@ bower_components
.sass-cache

.idea/

/cjs
/coverage
/esm
/types
1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

7 changes: 5 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"printWidth": 100,
"singleQuote": true
}
"singleQuote": true,
"semi": false,
"jsxBracketSameLine": true,
"trailingComma": "all"
}
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 3.0.0 Release
- react-leaflet v3.x support. For react-leaflet v2.x please use react-leaflet-heatmep-layer v2.x.

# 2.0.0 Release
- React-leaflet v2.x support. For react-leaflet v1.x please use react-leaflet-heatmep-layer v1.x.

Expand Down
23 changes: 0 additions & 23 deletions example/index.html

This file was deleted.

6 changes: 0 additions & 6 deletions example/index.jsx

This file was deleted.

Loading