Closed paulmcfe closed 7 years ago
Are you sure that's with v1.0.2?
Yes. I'm linking directly to csslint.js on csslint.net. I also tried downloading v1.0.2 and including the local copy instead of the remote file, but I received the same errors.
Try 1.0.1. Also do not rely on our website for your assets. It's bad practice.
On Jul 22, 2016 00:22, "Paul McFedries" notifications@github.com wrote:
Yes. I'm linking directly to csslint.js on csslint.net. I also tried downloading v1.0.2 and including the local copy instead of the remote file, but I received the same errors.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/CSSLint/csslint/issues/666#issuecomment-234388238, or mute the thread https://github.com/notifications/unsubscribe-auth/AAVVtTbBuWMf1faicTAtffGrpLtDYLgeks5qX-MogaJpZM4JRsOz .
Understood, thanks. 1.0.1 did not solve the problem. See also this CodeMirror issue, which seems to be the same problem:
https://github.com/codemirror/CodeMirror/commit/8a1dd1604974840fe69163f958ad204010442aea
There nothing I can do since the Web build works on our site.
You are welcome to make a pull request and CC me if you find fix. Have a look at parser lib too.
On Jul 22, 2016 13:23, "Paul McFedries" notifications@github.com wrote:
Understood, thanks. 1.0.1 did not solve the problem. See also this CodeMirror issue, which seems to be the same problem:
codemirror/CodeMirror@8a1dd16 https://github.com/codemirror/CodeMirror/commit/8a1dd1604974840fe69163f958ad204010442aea
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/CSSLint/csslint/issues/666#issuecomment-234509679, or mute the thread https://github.com/notifications/unsubscribe-auth/AAVVtUVm-ocrFZtTa42GRjmlYeAhLzsqks5qYJohgaJpZM4JRsOz .
I ran into the same problem. It is in the generated dist/csslint.js , it defines dummy module and exports in global scope, rather than inside CSSLint
definition.
It breaks integration with CodeMirror (and possibly other web js lib supporting module loading) because the dummy module and exports make CodeMirror mistakenly believe it is loaded in CommonJS environment.
One way to fix it is to change the Gruntefile and move the dummy module and exports inside CSSLint
definition.
Thought?
@orionlee: Please submit a PR and CC me.
I've been using csslint.js in a CodeMirror project for several months without a problem. A few days ago, I started getting "Uncaught ReferenceError: require is not defined" messages. After some trial and error, I found that if I remove csslint.js, the errors go away. Here are my includes:
The errors:
Perhaps a recent commit is causing the error?
Cheers, Paul