क्या मैं अपने जावास्क्रिप्ट को लिंट करने के लिए नोडमन का उपयोग कर सकता हूं? मैं किसी भी निर्माण उपकरण का उपयोग नहीं कर रहा हूँ उदा। गलियारा या कुल्ला और नोड और एनपीएम के उपयोग को अधिकतम करना चाहते हैं।नोडमन का उपयोग करके लिनिंग कैसे करें?
The output from nodemon can be piped। मैं एस्लिंट का उपयोग करके बदली गई फाइल को लिफ्ट करने के लिए इसका उपयोग करना चाहता हूं।
यहाँ मेरी package.json
{
"name": "app",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "nodemon server.js",
"lint": "eslint"
},
"dependencies": {
"MD5": "*",
"clean-css": "*",
"express": "~4.9.0",
"express-handlebars": "~2.0.1",
"express-redis-cache": "*",
"foundation-sites": "~5.5.3",
"fs-extra": "~0.8.1",
"node-rest-client": "~1.5.1",
"node-sass": "*",
"path": "*"
},
"devDependencies": {
"babel-eslint": "^4.1.6",
"eslint": "^1.10.3",
"eslint-config-airbnb": "^2.1.1",
"eslint-config-airbnb-es5": "^1.0.8",
"eslint-plugin-react": "^3.13.1",
"nodemon": "~1.8.1",
"parallelshell": "~2.0.0",
"watch": "~0.17.1"
}
}
मैं इस की कोशिश की है। लेकिन यह काम नहीं करता है। यह त्रुटि देता है।
"scripts": {
"start": "nodemon({ script: 'server.js' }).on('restart', function() {console.log('nodemon started');}).on('crash', function() {console.log('script crashed for some reason');});",
"lint": "eslint"
},
क्या कोई विशेष कारण है कि आप अपने टेक्स्ट एडिटर के माध्यम से सीधे प्रोसेस मैनेजर के साथ रनटाइम पर लिनिंग करना चाहते हैं? – Seonixx