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

Add scripts in 'build' directory to linting config #7676

Merged
merged 1 commit into from
Oct 29, 2021
Merged
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
Add scripts in 'build' directory to linting config
  • Loading branch information
jonkoops committed Sep 19, 2021
commit fe207cc4c49a39573f80d5ef3729fa36076e0b7f
2 changes: 1 addition & 1 deletion build/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function buildDocs() {

// Note to Vladimir: Iván's never gonna uncomment the following line. He's
// too proud of the little leaves around the code.
//doc.setLeadingChar('@');
// doc.setLeadingChar('@');

// Leaflet uses a couple of non-standard documentable things. They are not
// important enough to be classes/namespaces of their own, and should
Expand Down
10 changes: 5 additions & 5 deletions build/integrity.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ console.log('dist/leaflet.css: ', integrityCss.toString());

var docConfig = fs.readFileSync('docs/_config.yml').toString();

docConfig = docConfig.
replace(/latest_leaflet_version:.*/, 'latest_leaflet_version: ' + version).
replace(/integrity_hash_source:.*/, 'integrity_hash_source: "' + integritySrc.toString() + '"').
replace(/integrity_hash_uglified:.*/, 'integrity_hash_uglified: "' + integrityUglified.toString() + '"').
replace(/integrity_hash_css:.*/, 'integrity_hash_css: "' + integrityCss.toString() + '"');
docConfig = docConfig
.replace(/latest_leaflet_version:.*/, 'latest_leaflet_version: ' + version)
.replace(/integrity_hash_source:.*/, 'integrity_hash_source: "' + integritySrc.toString() + '"')
.replace(/integrity_hash_uglified:.*/, 'integrity_hash_uglified: "' + integrityUglified.toString() + '"')
.replace(/integrity_hash_css:.*/, 'integrity_hash_css: "' + integrityCss.toString() + '"');

// console.log('New jekyll docs config: \n', docConfig);

Expand Down
8 changes: 4 additions & 4 deletions build/rollup-config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Config file for running Rollup in "normal" mode (non-watch)

import rollupGitVersion from 'rollup-plugin-git-version'
import json from 'rollup-plugin-json'
import gitRev from 'git-rev-sync'
import pkg from '../package.json'
import rollupGitVersion from 'rollup-plugin-git-version';
import json from 'rollup-plugin-json';
import gitRev from 'git-rev-sync';
import pkg from '../package.json';

let {version} = pkg;
let release;
Expand Down
4 changes: 2 additions & 2 deletions build/rollup-watch-config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Config file for running Rollup in "watch" mode
// This adds a sanity check to help ourselves to run 'rollup -w' as needed.

import rollupGitVersion from 'rollup-plugin-git-version'
import gitRev from 'git-rev-sync'
import rollupGitVersion from 'rollup-plugin-git-version';
import gitRev from 'git-rev-sync';

const branch = gitRev.branch();
const rev = gitRev.short();
Expand Down
15 changes: 13 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"test": "karma start ./spec/karma.conf.js",
"build": "npm run rollup && npm run uglify",
"release": "./build/publish.sh",
"lint": "eslint src spec/suites docs/docs/js",
"lint": "eslint src spec/suites docs/docs/js build",
"lintfix": "npm run lint -- --fix",
"rollup": "rollup -c build/rollup-config.js",
"watch": "rollup -w -c build/rollup-watch-config.js",
Expand Down Expand Up @@ -93,7 +93,18 @@
"allowShortCircuit": true
}
]
}
},
"overrides": [
{
"files": ["build/**/*"],
"env": {
"node": true
},
"rules": {
"global-require": 0
}
}
]
},
"repository": {
"type": "git",
Expand Down