Skip to content

Commit

Permalink
chore: adding an eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
tomickigrzegorz committed Dec 5, 2020
1 parent 6030174 commit cc6091b
Show file tree
Hide file tree
Showing 6 changed files with 809 additions and 4 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modulse
29 changes: 29 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module.exports = {
env: {
browser: true,
node: true,
es6: true,
},
extends: ['eslint:recommended'],
plugins: ['prettier'],
rules: {
'prettier/prettier': [
'warn',
{
semi: true,
singleQuote: true,
tabWidth: 2,
endOfLine: 'auto',
printWidth: 80,
},
],
'comma-dangle': ['error', 'only-multiline'],
'linebreak-style': ['error', 'windows'],
'no-param-reassign': [
2,
{
props: false,
},
],
}
};
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.vscode
node_modules
16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "leaflet-examples",
"version": "1.0.0",
"repository": "https://github.com/tomik23/leaflet-examples.git",
"author": "Grzegorz Tomicki",
"license": "MIT",
"keywords": [
"leaflet-examples",
"leaflet-maps"
],
"devDependencies": {
"eslint": "^7.11.0",
"eslint-config-prettier": "^6.14.0",
"prettier": "^2.1.2"
}
}
10 changes: 6 additions & 4 deletions template/script.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-undef */
/**
* XXXXXXXXXXXX
*/
Expand All @@ -10,14 +11,15 @@ let config = {
// magnification with which the map will start
const zoom = 18;
// co-ordinates
const lat = 52.2297700;
const lon = 21.0117800;
const lat = 52.22977;
const lon = 21.01178;

// calling map
const map = L.map('map', config).setView([lat, lon], zoom);

// Used to load and display tile layers on the map
// Most tile servers require attribution, which you can set under `Layer`
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
attribution:
'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
}).addTo(map);
Loading

0 comments on commit cc6091b

Please sign in to comment.